Quantcast
Channel: Active questions tagged linefeed+php - Stack Overflow
Viewing all articles
Browse latest Browse all 21

Does omitting the closing tag of a PHP block at the end of a file remove any line feeds or whitespace,if present in a respective file?

$
0
0

I'm using PHP 7.1.12

I know that the closing tag of a block of PHP code automatically implies a semicolon so we do not need to have a semicolon terminating the last line of a PHP block.

The closing tag for the block will include the immediately trailing newline if one is present.

So, my question is suppose I'm having a PHP code block with few statements withing, I add ten line feeds after the last valid code line then I didn't add the closing PHP tag i.e. ?>

So, in above case will PHP remove those extra 10 line feeds or if any unwanted whitespace I've added?


Viewing all articles
Browse latest Browse all 21

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>