1--TEST--
2Test array_reduce() function : variation - invalid parameters
3--FILE--
4<?php
5/* Prototype  : mixed array_reduce(array input, mixed callback [, int initial])
6 * Description: Iteratively reduce the array to a single value via the callback.
7 * Source code: ext/standard/array.c
8 * Alias to functions:
9 */
10
11echo "*** Testing array_reduce() : variation - invalid parameters ***\n";
12
13
14$array = array(1);
15
16var_dump(array_reduce($array, "bogusbogus"));
17
18var_dump(array_reduce("bogusarray", "max"));
19
20var_dump(array_reduce(new stdClass(), "max"));
21
22?>
23===DONE===
24--EXPECTF--
25*** Testing array_reduce() : variation - invalid parameters ***
26
27Warning: array_reduce() expects parameter 2 to be a valid callback, function 'bogusbogus' not found or invalid function name in %sarray_reduce_variation2.php on line %d
28NULL
29
30Warning: array_reduce() expects parameter 1 to be array, string given in %sarray_reduce_variation2.php on line %d
31NULL
32
33Warning: array_reduce() expects parameter 1 to be array, object given in %sarray_reduce_variation2.php on line %d
34NULL
35===DONE===