title: Can someone explain the /e regex modifier?
body: <p>I'm currently improving my knowledge about security holes in HTML, PHP, JavaScript etc.
  A few hours ago, I stumbled across the <code>/e</code> modifier in regular expressions and I still don't get how it works. I've taken a look at the documentation, but that didn't really help.</p>
  
  <p>What I understood is that this modifier can be manipulated to give someone the opportunity to execute PHP code in (for example, <code>preg_replace()</code>). I've seen the following example describing a security hole but it wasn't explained, so could someone please explain me how to call <code>phpinfo()</code> in the following code?</p>
  
  <pre><code>$input = htmlentities("");
  if (strpos($input, 'bla'))
  {
     echo preg_replace("/" .$input ."/", $input ."&lt;img src='".$input.".png'&gt;", "bla");
  }
  </code></pre>