Doc #52526 [Opn->Csd]: Documentation for T_STRING implying bad programming style
| From: | kalle@php.net | Date: | Wed, 04 Aug 2010 09:20:56 +0000 |
| Subject: | Doc #52526 [Opn->Csd]: Documentation for T_STRING implying bad programming style | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-4789@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=52526&edit=1
ID: 52526
Updated by: kalle@php.net
Reported by: + at ni-po dot com
Summary: Documentation for T_STRING implying bad programming
style
-Status: Open
+Status: Closed
Type: Documentation Problem
Package: Documentation problem
PHP Version: Irrelevant
-Assigned To:
+Assigned To: kalle
Block user comment: N
New Comment:
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.
Thank you for the report, and for helping us make our documentation
better.
Previous Comments:
------------------------------------------------------------------------
[2010-08-04 11:20:48] kalle@php.net
Automatic comment from SVN on behalf of kalle
Revision: http://svn.php.net/viewvc/?view=revision&revision=301848
Log: Fixed bug #52526 (Documentation for T_STRING implying bad
programming style)
------------------------------------------------------------------------
[2010-08-03 18:17:31] + at ni-po dot com
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 this bug report at http://bugs.php.net/bug.php?id=52526&edit=1