Doc #52526 [NEW]: Documentation for T_STRING implying bad programming style

From: Date: Tue, 03 Aug 2010 16:17:31 +0000
Subject: Doc #52526 [NEW]: Documentation for T_STRING implying bad programming style
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-4785@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:Documentation for T_STRING implying bad programming style Description: ------------ The appendix token documentation for T_STRING implies a bad programming style. As an example it gives "$a[a]". According to the PHP documentation this is incorrect syntax, the correct one is "$a['a']" (which would result in a T_CONSTANT_ENCAPSED_STRING, not T_STRING.) "$a[a]" works, but only throwing a notice. Furthermore all the other uses of this allrounder-token are not mentioned (e.g. for function, class and method names, constant names, ..., ...) Proposed text: <row> <entry><constant>T_STRING</constant></entry> <entry>identifier</entry> <entry>identifier, e.g. function or class name</entry> </row> -- Edit bug report at http://bugs.php.net/bug.php?id=52526&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=52526&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=52526&r=trysnapshot53 Try a snapshot (trunk): http://bugs.php.net/fix.php?id=52526&r=trysnapshottrunk Fixed in SVN: http://bugs.php.net/fix.php?id=52526&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=52526&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=52526&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=52526&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=52526&r=needscript Try newer version: http://bugs.php.net/fix.php?id=52526&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=52526&r=support Expected behavior: http://bugs.php.net/fix.php?id=52526&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=52526&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=52526&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=52526&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=52526&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=52526&r=dst IIS Stability: http://bugs.php.net/fix.php?id=52526&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=52526&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=52526&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=52526&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=52526&r=mysqlcfg

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