php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #53054 Strings variable parsing - complex syntax
Submitted: 2010-10-13 18:12 UTC Modified: 2010-10-19 06:46 UTC
From: chealer at gmail dot com Assigned: kalle (profile)
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: chealer at gmail dot com
New email:
PHP Version: OS:

 

 [2010-10-13 18:12 UTC] chealer at gmail dot com
Description:
------------
To continue http://bugs.php.net/bug.php?id=52897 which remains closed,
the new documentation text does not indicate that the complex syntax allows accessing elements of array variables ({$arr['bar]}).

BTW, in the examples, there is still an extra backslash for the method example:
This is the value of the var named by the return value of \$object->getName():



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-10-19 06:24 UTC] kalle@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: kalle
 [2010-10-19 06:24 UTC] kalle@php.net
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.

The backslash is correct as the string is interpolated and would otherwise output something incorrect.
 [2010-10-19 06:25 UTC] kalle@php.net
Automatic comment from SVN on behalf of kalle
Revision: http://svn.php.net/viewvc/?view=revision&revision=304495
Log: Fixed bug #53054 (Strings variable parsing - complex syntax)
 [2010-10-19 06:46 UTC] chealer at gmail dot com
This report is about the *complex* syntax. Also, the problem is the text, which does not explain the possibility of accessing array elements with the syntax. The examples do.

The new documentation text I referred to is:
Any scalar variable, array variable or object property with a string representation can be included via this syntax.

Note that array elements were an example, the description is over-restrictive in general.
 [2020-02-07 06:09 UTC] phpdocbot@php.net
Automatic comment on behalf of kalle
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=3247b212f4f29afb19b94ef56cda8ee1d05eb0c3
Log: Fixed bug #53054 (Strings variable parsing - complex syntax)
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Thu Oct 08 04:00:01 2026 UTC