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:
committed by
Nikita Popov
parent
00c2c3a476
commit
cba560e67f
25
ext/standard/tests/array/compact_order.phpt
Normal file
25
ext/standard/tests/array/compact_order.phpt
Normal 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
|
||||
}
|
||||
Reference in New Issue
Block a user