title: php regex escaping special characters
body: <p>I wrote the following code (yes it does work) and was wondering why I don't need to escape the '&lt;' and '>' characters inside the pattern since they are considered 'special' characters by the php manual.</p>
  
  <p><a href="http://www.php.net/manual/en/function.preg-quote.php" rel="noreferrer">http://www.php.net/manual/en/function.preg-quote.php</a></p>
  
  <pre><code>var_dump(preg_match('/&lt;[A-Za-z][A-Za-z0-9]*&gt;/', "&lt;html&gt;", $matches));
  
  echo "&lt;pre&gt;";
  var_dump(htmlentities($matches[0]));
  echo "&lt;/pre&gt;";
  </code></pre>
  
  <p>output:</p>
  
  <pre><code>int(1) 
  string(12) "&lt;html&gt;"
  </code></pre>