Skip to content

Commit cba560e

Browse files
marcioAlmadanikic
authored andcommitted
add extra test to protected behavior of compact and array string key order
1 parent 00c2c3a commit cba560e

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
--TEST--
2+
compact() and hashmap order
3+
--FILE--
4+
<?php
5+
6+
$foo = null;
7+
$bar = null;
8+
9+
var_dump(compact('foo', 'bar'));
10+
var_dump(compact('bar', 'foo'));
11+
12+
?>
13+
--EXPECT--
14+
array(2) {
15+
["foo"]=>
16+
NULL
17+
["bar"]=>
18+
NULL
19+
}
20+
array(2) {
21+
["bar"]=>
22+
NULL
23+
["foo"]=>
24+
NULL
25+
}

0 commit comments

Comments
 (0)