PHP Closing tag ?>

Sometime ago I saw some framework where all files missed PHP closing tags, I wondered why ? Simply, this tag is not required by PHP parser, interesting when this was introduced. But one advantage of this is elimination of hunting down final carriage return character in the end file. This additional CR mess up the output when including.

In projects with 200+ code files, one simple return at the end of file can cause bugs hard to find.

UPD: My discovery is clearly described in documentation 🙂 http://php.net/manual/en/language.basic-syntax.instruction-separation.php

3 comments

  1. Cool ) Completely missed this point and documentation gives exactly same hint as I did. Interesting was it in PHP with every beginning ? like version 3 or 4.

  2. maybe it’s title this because from the presice moment she was attacked it will be forever Inevitable that she will question her every move, look over her shoulder at every sound, fear every stranger who comes near her, it will be Inevitable that she will live her entire life in fear of the unknown.

Leave a Reply

Your email address will not be published.