Home » PHP » Some leftover bits and pieces in PHP

Some leftover bits and pieces in PHP

about line feed

PHP will automatically delete the end of in the output? A newline after >. The main function is to embed in a page in PHP code or contains no substantive output PHP files and design, at the same time also caused some confusion. If the PHP end of >? The output line feed, can be followed by a space, or add a newline in a echo/print statement in the


About end tags
If the

file is pure PHP code, the best in the end of the file to delete the PHP end tag. This can be avoided after the closing PHP tag in case of accidental joined spaces or newlines, causes the PHP to output the blank, but this time there was a script output intention.

About instruction separators
The last line in the

PHP code snippet can end the.

without a semicolon
<, PHP, echo, This, is, a, test, >
For the #
Echo 123 / 123

Keep updating.

copyright notice: This article is original article for blogger. Without permission from blogger,.

must not be reprinted