1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 16:22:37 +01:00
Files
archived-php-src/ext/standard/tests/array/bug48854.phpt
Gabriel Caruso ded3d984c6 Use EXPECT instead of EXPECTF when possible
EXPECTF logic in run-tests.php is considerable, so let's avoid it.
2018-02-20 21:53:48 +01:00

44 lines
605 B
PHP

--TEST--
Bug #48854 (array_merge_recursive modifies arrays after first one)
--FILE--
<?php
$array1 = array(
'friends' => 5,
'children' => array(
'dogs' => 0,
),
);
$array2 = array(
'friends' => 10,
'children' => array(
'cats' => 5,
),
);
$merged = array_merge_recursive($array1, $array2);
var_dump($array1, $array2);
?>
--EXPECT--
array(2) {
["friends"]=>
int(5)
["children"]=>
array(1) {
["dogs"]=>
int(0)
}
}
array(2) {
["friends"]=>
int(10)
["children"]=>
array(1) {
["cats"]=>
int(5)
}
}