HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
closetag php
jackmaessen
✭✭✭
Can someone tell me why all the vanilla php files have no closetag at the end?
?>
It has something to do with OOP programming?
0
Comments
It can have a bad effect. There are times when you do have it . Like when there is html after php
for example
If there is no html after the last php lines you leave it open.
http://php.net/manual/en/language.basic-syntax.phptags.php
http://www.phpforkids.com/php/php-syntax-opening-closing-tags.php
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
Ok. I checked it on php.net and i really did not know that it is recommended to leave the close tag when there is only php code in it. I've learned something again! Thanks @vrijvlinder
I guess it depends on the entire code's purpose to know what is the best to use. But for plugins ,that is what works better with vanilla.
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌