Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>PHP is an unusual (templated) language in this context. The parser actually considers everything between <code>?&gt;</code> and <code>&lt;?php</code> as being some weird kind of echo. It is ignored as part of the program code, although the parser does run (it just outputs it and skips it as part of program code).</p> <p>From the <a href="http://www.php.net/manual/en/language.basic-syntax.phpmode.php" rel="nofollow">PHP manual</a>:</p> <blockquote> <p>Everything outside of a pair of opening and closing tags is ignored by the PHP parser which allows PHP files to have mixed content. This allows PHP to be embedded in HTML documents, for example to create templates. <br>(...)<br> This works as expected, because when the PHP interpreter hits the ?> closing tags, it simply starts outputting whatever it finds (except for an immediately following newline - see instruction separation) until it hits another opening tag unless in the middle of a conditional statement in which case the interpreter will determine the outcome of the conditional before making a decision of what which to skip over.</p> </blockquote> <p>This allows PHP to be used for numerous of things. You can't just create dynamic HTML files with it, you can for example also create XML (although it's a bit tricky to get the XML header right), text files, CSS files, etc., as long as the PHP interpreter is ran for that file, it will execute everything between <code>&lt;?php</code> and <code>?&gt;</code> as program code and the rest will be outputted as-is.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload