Doc #52722 [NEW]: Don't teach beginners wrong stuff: Drop brackets around language constructs!

From: Date: Sat, 28 Aug 2010 12:10:53 +0000
Subject: Doc #52722 [NEW]: Don't teach beginners wrong stuff: Drop brackets around language constructs!
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-4945@lists.php.net to get a copy of this message
From: Operating system: PHP version: Irrelevant Package: Documentation problem Bug Type: Documentation Problem Bug description:Don't teach beginners wrong stuff: Drop brackets around language constructs! Description: ------------ One thing that very much annoys me about the PHP documentation that it teaches beginners *wrong* stuff by writing all language constructs with parenthesis. Example: If called from within a function, the return() statement immediately ends execution of the current function [...] And it's like this everywhere! Admittedly all code examples use the correct syntax without parentheses. But writing return() everywhere else in the documentation makes it seem like the parentheses belong to the return statement and the syntax without parenthesis is only another way to write it. Thus I would strongly support the removal of this misleading notation. (This obviously doesn't apply only to the return statement, but to echo, print, include, include_once, require and require_once, too.) -- Edit bug report at http://bugs.php.net/bug.php?id=52722&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=52722&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=52722&r=trysnapshot53 Try a snapshot (trunk): http://bugs.php.net/fix.php?id=52722&r=trysnapshottrunk Fixed in SVN: http://bugs.php.net/fix.php?id=52722&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=52722&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=52722&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=52722&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=52722&r=needscript Try newer version: http://bugs.php.net/fix.php?id=52722&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=52722&r=support Expected behavior: http://bugs.php.net/fix.php?id=52722&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=52722&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=52722&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=52722&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=52722&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=52722&r=dst IIS Stability: http://bugs.php.net/fix.php?id=52722&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=52722&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=52722&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=52722&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=52722&r=mysqlcfg

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