Editor, PHP scripts

Editor, PHP scripts

kniel_edvkniel_edv Posts: 9Questions: 2Answers: 0

Just wondering: in the PHP scripts delivered with the Editor examples the PHP code is started with <?php but never closed with ?>.
Is this intended and even a necessity or a lapse?

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 61,864Questions: 1Answers: 10,136 Site admin
    Answer ✓

    Its intended.

    PHP scripts don't need to have a closing tag if they don't need to display anything after the code, and since the libraries scripts are pure PHP they never show HTML. Leaving them out also ensures that they don't accidentally introduce whitespace into the output.

    Allan

  • kniel_edvkniel_edv Posts: 9Questions: 2Answers: 0

    Thanks for the fast answer.

This discussion has been closed.