Req #60698 [Opn->Nab]: Explicitly discouraging parethenses for arguments in some language constructs

From: Date: Sun, 06 Oct 2013 07:32:39 +0000
Subject: Req #60698 [Opn->Nab]: Explicitly discouraging parethenses for arguments in some language constructs
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-10434@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=60698&edit=1 ID: 60698 Updated by: krakjoe@php.net Reported by: phpmpan at mpan dot pl Summary: Explicitly discouraging parethenses for arguments in some language constructs -Status: Open +Status: Not a bug Type: Feature/Change Request Package: Documentation problem PHP Version: Irrelevant Block user comment: N Private report: N New Comment: Using language constructs expressively is only supported by some language constructs, Previous Comments: ------------------------------------------------------------------------ [2012-01-10 10:51:39] phpmpan at mpan dot pl Description: ------------ Bug#60694 (and not only it) shows that users too often misinterpret parenthenses around arguments for the following language constructs: - echo - print - include - include_once - require - require_once Documentation for those things should include warning about the issue (not necessarily the red warning box, a simple sentence should be enough). Currently there is a notice that multiple arguments for echo should not be enclosed in parenthenses and. Also docs for include family warn about a case when the return value is used in an expression. However I believe this is insufficient and should be replaced with an explicit warning. Bug#52722 is related. Expected result: ---------------- Users should not misinterpret code Actual result: -------------- Users misinterpret code, because of parenthenses around arguments ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=60698&edit=1

« previous php.doc.bugs (#10434) next »