The PHP code segment end tag at the end of the file is optional. In some cases, it is better to omit it when using include or require so that unexpected whitespace characters will not appear at the end of the file. Response headers can still be output afterwards. It's also convenient when using output buffering, so you don't see unwanted whitespace characters generated by include files.
http://php.net/manual/zh/language.basic-syntax.instruction-separation.php
The above has introduced that the end tag of the PHP code segment at the end of the file can be omitted and is better, including aspects of the content. I hope it will be helpful to friends who are interested in PHP tutorials.