Req #60698 [NEW]: Explicitly discouraging parethenses for arguments in some language constructs

From: Date: Tue, 10 Jan 2012 10:51:39 +0000
Subject: Req #60698 [NEW]: Explicitly discouraging parethenses for arguments in some language constructs
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-7762@lists.php.net to get a copy of this message
From: Operating system: PHP version: Irrelevant Package: Documentation problem Bug Type: Feature/Change Request Bug description:Explicitly discouraging parethenses for arguments in some language constructs 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 bug report at https://bugs.php.net/bug.php?id=60698&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=60698&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=60698&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=60698&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=60698&r=fixed Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=60698&r=needdocs Fixed in release: https://bugs.php.net/fix.php?id=60698&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=60698&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=60698&r=needscript Try newer version: https://bugs.php.net/fix.php?id=60698&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=60698&r=support Expected behavior: https://bugs.php.net/fix.php?id=60698&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=60698&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=60698&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=60698&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=60698&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=60698&r=dst IIS Stability: https://bugs.php.net/fix.php?id=60698&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=60698&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=60698&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=60698&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=60698&r=mysqlcfg

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