Bug #73207 [NEW]: Array ordering is same between 5.6.21 and 7.1.0 RC3
| From: | tuyen-truong at cybozu dot vn | Date: | Fri, 30 Sep 2016 08:40:36 +0000 |
| Subject: | Bug #73207 [NEW]: Array ordering is same between 5.6.21 and 7.1.0 RC3 | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-204361@lists.php.net to get a copy of this message | ||
From: tuyen-truong at cybozu dot vn
Operating system:
PHP version: 7.1.0RC3
Package: Arrays related
Bug Type: Bug
Bug description:Array ordering is same between 5.6.21 and 7.1.0 RC3
Description:
------------
As description at
http://php.net/manual/en/migration70.incompatible.php
The "Array ordering when elements are automatically created during by
reference assignments has changed" is written.
And there is no other description about array ordering in
http://php.net/manual/en/migration71.incompatible.php
But, when I have confirmed the result, I saw that the output of
php5.6.21 and php7.1.0RC3 are same.
I think that it is bug of PHP7.1.0RC3, but please confirm it is a bug or
not.
Thank you.
Test script:
---------------
1.
php56.exe -r "$array = []; $array['a'] =& $array['b'];
$array['b'] = 1;
var_dump($array);"
Output:
array(2) {
["b"]=>
&int(1)
["a"]=>
&int(1)
}
2. // php7.0.6
php70.exe -r "$array = []; $array['a'] =& $array['b'];
$array['b'] = 1;
var_dump($array);"
Output:
array(2) {
["a"]=>
&int(1)
["b"]=>
&int(1)
}
3.
php71.exe -r "$array = []; $array['a'] =& $array['b'];
$array['b'] = 1;
var_dump($array);"
Output:
array(2) {
["b"]=>
&int(1)
["a"]=>
&int(1)
}
Expected result:
----------------
When executing this script
3.
php71.exe -r "$array = []; $array['a'] =& $array['b'];
$array['b'] = 1;
var_dump($array);"
The output will be same the output of php7.0.6
array(2) {
["a"]=>
&int(1)
["b"]=>
&int(1)
}
--
Edit bug report at https://bugs.php.net/bug.php?id=73207&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=73207&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=73207&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=73207&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=73207&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=73207&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=73207&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=73207&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=73207&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=73207&r=support
Expected behavior: https://bugs.php.net/fix.php?id=73207&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=73207&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=73207&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=73207&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=73207&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=73207&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=73207&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=73207&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=73207&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=73207&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=73207&r=mysqlcfg