2016-10-29, 06:03:07
functions.php
|
2016-10-29, 06:52:32
yeah its fine, some people leave the close php tag out as it prevents errors if whitespace is left after the tag.
From the PHP Manual: The closing tag of a PHP block at the end of a file is optional, and in some cases omitting it is helpful when using include() or require(), so unwanted whitespace will not occur at the end of files, and you will still be able to add headers to the response later.Nov 13, 2013
Yes, that's right.
The end of the <?php tag is implied by the end of the file. Additionally, not having the closing tag means that there will not be any errors introduced by, for example, a newline after the closing tag. The 'no closing tag' is considered good practice, as I recall. If I can find a reference, I'll add it. Edit: @n00dles beat me to it ...
--
Nick. |
« Next Oldest | Next Newest »
|
Users browsing this thread: 1 Guest(s)