I have recently seen code samples of php which looks something like this:
<?php
//some code here
//some more code
Is it possible to write a php code without closing tags? thanks in advance.
This is from PHP Manual
"If a file is pure PHP code, it is preferable to omit the PHP closing tag at the end of the file. This prevents accidental whitespace or new lines being added after the PHP closing tag, which may cause unwanted effects because PHP will start output buffering when there is no intention from the programmer to send any output at that point in the script."
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With