This question already has an answer here:
- Why would one omit the close tag? 14 answers
In some scripts I see that they omit writing a closing tag ?>
for the script. Why is it and should I do this as well?
(I'm sure they have not forgotten it.)
This question already has an answer here:
In some scripts I see that they omit writing a closing tag ?>
for the script. Why is it and should I do this as well?
(I'm sure they have not forgotten it.)
Modern versions of PHP set the
output_buffering
flag inphp.ini
. If output buffering is enabled, you can set HTTP headers and cookies after outputting HTML, because the returned code is not sent to the browser immediately.Are the examples still valid in this context?