why is PHP not throwing a parse error?
<p>There are lots of "Why does PHP throw an error here?" questions. Well, this is a little different. I found the following code while reworking some code written by a coworker:</p>

<pre><code>foreach($arr as $key =&gt; $value) {http://google.com/
  echo $value;
  // ...
}
</code></pre>

<p>My first thought: "Umm...how embarrassing; he must have accidentally pasted that in there..." followed by: "Wait...there's no way this code actually runs...that should be a syntax error". And yet:</p>

<pre><code> $ php -l test.php
 No syntax errors detected
</code></pre>

<p>And indeed, (like so much PHP code that seemingly shouldn't run) it runs in production without trouble. So I did a little testing:</p>

<pre><code>foreach($arr as $key =&gt; $value) {http://google.com/ &lt;-- original, no error
foreach($arr as $key =&gt; $value) {http: &lt;-- also no syntax error
foreach($arr as $key =&gt; $value) {http  &lt;-- bingo! "Unexpected T_ECHO..."
</code></pre>

<p>What little tidbit of PHP's grammar is producing such strange results?</p>

<p>(I am using PHP 5.3.5)</p>
