From 92cb59e6a5212b98181577c5a011dfb37dfef9ee Mon Sep 17 00:00:00 2001 From: Mikhail Alferov Date: Fri, 13 Dec 2024 13:56:37 +0300 Subject: [PATCH] basic-syntax.xml Specify when it is better to skip closing PHP tags It seemed to me that limiting the skipping of closing PHP tags to only files that contain only PHP code is misleading. After all, we skip closing tags in files with mixed content too, and the condition for skipping is not whether the file consists only of PHP code, but whether the file ends with PHP code --- language/basic-syntax.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/language/basic-syntax.xml b/language/basic-syntax.xml index d54affadf944..3aa01137d409 100644 --- a/language/basic-syntax.xml +++ b/language/basic-syntax.xml @@ -53,7 +53,7 @@ - If a file contains only PHP code, it is preferable to omit the PHP closing tag + If a file ends with PHP code, it is preferable to omit the PHP closing tag at the end of the file. This prevents accidental whitespace or new lines being added after the PHP closing tag, which may cause unwanted effects because PHP will start output buffering when there is no intention from