Doc #72500 [Opn->Csd]: Imprecision about compatibility of "Variable variables and global"
| From: | cmb@php.net | Date: | Sun, 08 Apr 2018 17:23:40 +0000 |
| Subject: | Doc #72500 [Opn->Csd]: Imprecision about compatibility of "Variable variables and global" | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-15592@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=72500&edit=1
ID: 72500
Updated by: cmb@php.net
Reported by: gwenael dot chailleu at gmail dot com
Summary: Imprecision about compatibility of "Variable
variables and global"
-Status: Open
+Status: Closed
Type: Documentation Problem
Package: Documentation problem
PHP Version: 7.0.8
-Assigned To:
+Assigned To: cmb
Block user comment: N
Private report: 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:
------------------------------------------------------------------------
[2018-04-08 17:23:08] cmb@php.net
Automatic comment from SVN on behalf of cmb
Revision: http://svn.php.net/viewvc/?view=revision&revision=344640
Log: Fix #72500: Imprecision about compatibility of "Variable variables and
global"
------------------------------------------------------------------------
[2016-06-27 09:43:51] cmb@php.net
I agree that this section[1] is not clear enough, and that the
example is indeed more related to the new uniform variable
syntax[2]. At least variable variables appear to work fine with
global, see <https://3v4l.org/fvtGd>. I'm assigning
to Adam who
made the relevant commit (r337333). Can you please clarify, Adam?
[1] <http://php.net/manual/en/migration70.incompatible.php#migration70.incompatible.variable-handling.global>
[2] <https://wiki.php.net/rfc/uniform_variable_syntax>
------------------------------------------------------------------------
[2016-06-27 08:24:27] gwenael dot chailleu at gmail dot com
Description:
------------
Hello,
I can read in http://php.net/manual/fr/migration70.incompatible.php
that "Variable variables can no longer be used with the global keyword. ". In my
interpretation of this warning "global $$var;" is no longer a valid syntax and must be
replaced by "global ${$var};" . But, obviously, "global $$var;" it still
accepted (only tested in php 7.0.4). Is this particular syntax planned to be removed ? The code
example given (global $$foo->bar;) should rather illustrate the new left-to right evaluation
order of the expressions including variable variables syntax.
Thanks for your answer !
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=72500&edit=1