blob: 2cfeb734b493770c73e622fd2cec8684d7e3105d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
--TEST--
Bug #52719: array_walk_recursive crashes if third param of the function is by reference
--FILE--
<?php
$array = array("hello", array("world"));
$userdata = array();
array_walk_recursive(
$array,
function ($value, $key, &$userdata) { },
$userdata
);
echo "Done";
?>
--EXPECTF--
Warning: {closure}(): Argument #3 ($userdata) must be passed by reference, value given in %s on line %d
Warning: {closure}(): Argument #3 ($userdata) must be passed by reference, value given in %s on line %d
Done
|