1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 08:12:21 +01:00

add extra test to protected behavior of compact and array string key order

This commit is contained in:
Márcio Almada
2016-09-01 03:52:54 -04:00
committed by Nikita Popov
parent 00c2c3a476
commit cba560e67f

View File

@@ -0,0 +1,25 @@
--TEST--
compact() and hashmap order
--FILE--
<?php
$foo = null;
$bar = null;
var_dump(compact('foo', 'bar'));
var_dump(compact('bar', 'foo'));
?>
--EXPECT--
array(2) {
["foo"]=>
NULL
["bar"]=>
NULL
}
array(2) {
["bar"]=>
NULL
["foo"]=>
NULL
}