1--TEST--
2Test array_walk_recursive() function : usage variations - buit-in function as callback
3--FILE--
4<?php
5/* Prototype  : bool array_walk_recursive(array $input, string $funcname [, mixed $userdata])
6 * Description: Apply a user function to every member of an array
7 * Source code: ext/standard/array.c
8*/
9
10/*
11 * Passing different buit-in functionns as callback function
12 *    pow function
13 *    min function
14 *    echo language construct
15*/
16
17echo "*** Testing array_walk_recursive() : built-in function as callback ***\n";
18
19$input = array(array(2 => 1, 65), array(98, 100), array(6 => -4));
20
21echo "-- With 'pow' built-in function --\n";
22var_dump( array_walk_recursive($input, 'pow'));
23
24echo "-- With 'min' built-in function --\n";
25var_dump( array_walk_recursive($input, "min"));
26
27echo "-- With 'echo' language construct --\n";
28var_dump( array_walk_recursive($input, "echo"));
29
30echo "Done"
31?>
32--EXPECTF--
33*** Testing array_walk_recursive() : built-in function as callback ***
34-- With 'pow' built-in function --
35bool(true)
36-- With 'min' built-in function --
37bool(true)
38-- With 'echo' language construct --
39
40Warning: array_walk_recursive() expects parameter 2 to be a valid callback, function 'echo' not found or invalid function name in %s on line %d
41NULL
42Done
43