1--TEST-- 2array_walk_recursive() tests 3--FILE-- 4<?php 5 6function foo($v1, $v2, $v3) { 7 var_dump($v1); 8 var_dump($v2); 9 var_dump($v3); 10} 11 12$var = array(1,2, array(2,3)); 13var_dump(array_walk_recursive($var, "foo", "data")); 14 15function foo2($v1, $v2, $v3) { 16 throw new Exception($v3); 17} 18 19try { 20 var_dump(array_walk_recursive($var,"foo2", "data")); 21} catch (Exception $e) { 22 var_dump($e->getMessage()); 23} 24 25echo "Done\n"; 26?> 27--EXPECT-- 28int(1) 29int(0) 30string(4) "data" 31int(2) 32int(1) 33string(4) "data" 34int(2) 35int(0) 36string(4) "data" 37int(3) 38int(1) 39string(4) "data" 40bool(true) 41string(4) "data" 42Done 43