Bug #55325 [Opn->Dup]: array constant key cause un-order result
Edit report at https://bugs.php.net/bug.php?id=55325&edit=1
ID: 55325
Updated by: laruence@php.net
Reported by: laruence@php.net
Summary: array constant key cause un-order result
-Status: Open
+Status: Duplicate
Type: Bug
Package: Scripting Engine problem
Operating System: Linux
PHP Version: 5.3SVN-2011-07-30 (SVN)
Block user comment: N
Private report: N
New Comment:
hmm, actually it's a dup...
Previous Comments:
------------------------------------------------------------------------
[2011-07-30 15:34:34] laruence@php.net
The following patch has been added/updated:
Patch Name: bug55325.patch
Revision: 1312040074
URL: https://bugs.php.net/patch-display.php?bug=55325&patch=bug55325.patch&revision=1312040074
------------------------------------------------------------------------
[2011-07-30 15:33:59] laruence@php.net
Description:
------------
this is similar to #50816
but not quite same.
Test script:
---------------
define("FIRST_KEY", "a");
define("THIRD_KEY", "c");
function test()
{
static $arr = array(
"a" => "222",
FIRST_KEY => "111",
"c" => "333",
THIRD_KEY => "444",
);
print_r($arr);
}
test();
Expected result:
----------------
Array
(
[a] => 111
[c] => 444
)
Actual result:
--------------
Array
(
[a] => 222
[c] => 444
)
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=55325&edit=1
Thread (3 messages)