xref: /php-src/Zend/tests/bug28072.phpt (revision 9c144e0d)
1--TEST--
2Bug #28072 (static array with some constant keys will be incorrectly ordered)
3--FILE--
4<?php
5define("FIRST_KEY", "a");
6define("THIRD_KEY", "c");
7
8
9function test()
10{
11        static $arr = array(
12                FIRST_KEY => "111",
13                "b" => "222",
14                THIRD_KEY => "333",
15                "d" => "444"
16        );
17        print_r($arr);
18}
19
20function test2()
21{
22        static $arr = array(
23                FIRST_KEY => "111",
24                "a" => "222",
25                "c" => "333",
26                THIRD_KEY => "444"
27        );
28        print_r($arr);
29}
30
31test();
32test2();
33?>
34--EXPECT--
35Array
36(
37    [a] => 111
38    [b] => 222
39    [c] => 333
40    [d] => 444
41)
42Array
43(
44    [a] => 222
45    [c] => 444
46)
47