Bug #69784 [Opn->Nab]: bad variable reference
Edit report at https://bugs.php.net/bug.php?id=69784&edit=1
ID: 69784
Updated by: nikic@php.net
Reported by: artur at salonstron dot pl
Summary: bad variable reference
-Status: Open
+Status: Not a bug
Type: Bug
Package: Variables related
Operating System: irrelevant
PHP Version: 5.6.9
Block user comment: N
Private report: N
New Comment:
Closing this, as the provided code behaves as intended. I can't say why you are observing
different behavior on older versions, but the current behavior is definitely correct.
Previous Comments:
------------------------------------------------------------------------
[2015-06-10 11:14:07] artur at salonstron dot pl
I run some other tests and it seems that on servers with php 5.2.* 5.3.* 5.4.* script works as I
expected on servers with php 5.6.* it work different
------------------------------------------------------------------------
[2015-06-10 10:14:31] artur at salonstron dot pl
Customer servers running on different Linux distributions.
------------------------------------------------------------------------
[2015-06-10 10:10:50] artur at salonstron dot pl
Currently I'm using: PHP Version 5.5.11 on windows. On most of my clients servers php version
is 5.2-5.5. Recently, one of the servers has been updated to version 5.6.9 and the difference is
just there.
See this example: http://phpbug.studiostron.eu/ its
output of the same script + phpversion()
------------------------------------------------------------------------
[2015-06-10 09:49:56] nikic@php.net
According to http://3v4l.org/L8GsZ this behavior has stayed the
same for all PHP versions - apart from a short regression interval in PHP 7. Are you sure the code
you tested on older versions wasn't in some way different?
------------------------------------------------------------------------
[2015-06-10 09:43:54] artur at salonstron dot pl
in previous versions of php script worked differently. The variable $d was assigned to different
array with unmodified IAP.
It seems to me that it is a a bug because if I wanted to return a reference to the array, which is
inside a function test() I would done it differently.
Sorry for my english, I hope that everybody understands what I mean.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=69784
--
Edit this bug report at https://bugs.php.net/bug.php?id=69784&edit=1
Thread (8 messages)