1--TEST--
2array_walk_recursive() tests
3--FILE--
4<?php
5
6var_dump(array_walk_recursive());
7$var = 1;
8var_dump(array_walk_recursive($var,1));
9$var = array();
10var_dump(array_walk_recursive($var,""));
11
12function foo($v1, $v2, $v3) {
13	var_dump($v1);
14	var_dump($v2);
15	var_dump($v3);
16}
17
18$var = array(1,2, array(2,3));
19var_dump(array_walk_recursive($var, "foo", "data"));
20
21function foo2($v1, $v2, $v3) {
22	throw new Exception($v3);
23}
24
25try {
26	var_dump(array_walk_recursive($var,"foo2", "data"));
27} catch (Exception $e) {
28	var_dump($e->getMessage());
29}
30
31echo "Done\n";
32?>
33--EXPECTF--
34Warning: array_walk_recursive() expects at least 2 parameters, 0 given in %s on line %d
35NULL
36
37Warning: array_walk_recursive() expects parameter 1 to be array, int given in %s on line %d
38NULL
39
40Warning: array_walk_recursive() expects parameter 2 to be a valid callback, function '' not found or invalid function name in %s on line %d
41NULL
42int(1)
43int(0)
44string(4) "data"
45int(2)
46int(1)
47string(4) "data"
48int(2)
49int(0)
50string(4) "data"
51int(3)
52int(1)
53string(4) "data"
54bool(true)
55string(4) "data"
56Done
57