Home
last modified time | relevance | path

Searched refs:array_reduce (Results 1 – 17 of 17) sorted by relevance

/PHP-7.2/ext/standard/tests/array/
H A Darray_reduce.phpt2 Test array_reduce() function
13 echo "\n*** Testing array_reduce() to integer ***\n";
18 echo "\n*** Testing array_reduce() to float ***\n";
23 echo "\n*** Testing array_reduce() to string ***\n";
28 echo "\n*** Testing array_reduce() to array ***\n";
33 echo "\n*** Testing array_reduce() to null ***\n";
41 *** Testing array_reduce() to integer ***
45 *** Testing array_reduce() to float ***
49 *** Testing array_reduce() to string ***
53 *** Testing array_reduce() to array ***
[all …]
H A Darray_reduce_error.phpt2 Test array_reduce() function : error conditions
5 /* Prototype : mixed array_reduce(array input, mixed callback [, int initial])
11 echo "*** Testing array_reduce() : error conditions ***\n";
14 //Test array_reduce with one more than the expected number of arguments
15 echo "\n-- Testing array_reduce() function with more than expected no. of arguments --\n";
20 var_dump( array_reduce($input, $callback, $initial, $extra_arg) );
22 // Testing array_reduce with one less than the expected number of arguments
25 var_dump( array_reduce($input) );
30 *** Testing array_reduce() : error conditions ***
32 -- Testing array_reduce() function with more than expected no. of arguments --
[all …]
H A Darray_reduce_variation2.phpt2 Test array_reduce() function : variation - invalid parameters
5 /* Prototype : mixed array_reduce(array input, mixed callback [, int initial])
11 echo "*** Testing array_reduce() : variation - invalid parameters ***\n";
16 var_dump(array_reduce($array, "bogusbogus"));
18 var_dump(array_reduce("bogusarray", "max"));
20 var_dump(array_reduce(new stdClass(), "max"));
25 *** Testing array_reduce() : variation - invalid parameters ***
27 Warning: array_reduce() expects parameter 2 to be a valid callback, function 'bogusbogus' not found…
30 Warning: array_reduce() expects parameter 1 to be array, string given in %sarray_reduce_variation2.…
33 Warning: array_reduce() expects parameter 1 to be array, object given in %sarray_reduce_variation2.…
H A Darray_reduce_variation3.phpt2 Test array_reduce() function : variation - object callbacks
5 /* Prototype : mixed array_reduce(array input, mixed callback [, int initial])
11 echo "*** Testing array_reduce() : variation - object callbacks ***\n";
21 var_dump(array_reduce($array, array("A", "adder")));
24 var_dump(array_reduce($array, array(new A(), "adder2")));
29 *** Testing array_reduce() : variation - object callbacks ***
H A Dbug40709.phpt2 Bug #40709 (array_reduce() behaves strange with one item stored arrays)
15 echo "result for arr1: ".array_reduce($arr1,'CommaSeparatedList')."\n";
16 echo "result for arr2: ".array_reduce($arr2,'CommaSeparatedList')."\n";
17 echo "result for arr1: ".array_reduce($arr1,'CommaSeparatedList')."\n";
18 echo "result for arr2: ".array_reduce($arr2,'CommaSeparatedList')."\n";
H A Darray_reduce_variation1.phpt2 Test array_reduce() function : variation
5 /* Prototype : mixed array_reduce(array input, mixed callback [, int initial])
11 echo "*** Testing array_reduce() : variation ***\n";
25 var_dump(array_reduce($array, "oneArg", 2));
29 var_dump(array_reduce($array, "threeArgs", 2));
37 *** Testing array_reduce() : variation ***
H A Dbug24980.phpt2 Bug #24980 (array_reduce() uses first element as default running total)
14 $total = array_reduce($numbers, 'add_up');
23 var_dump(array_reduce($a, "foo"));
38 $b = array_reduce($a, "rsum");
39 $c = array_reduce($a, "rmul", 10);
40 $d = array_reduce($x, "rsum", 1);
H A Dbug76778.phpt2 Bug #76778 (array_reduce leaks memory if callback throws exception)
6 array_reduce(
H A Dbug22463.phpt2 Bug #22463 (array_reduce() segfaults)
7 return (is_array($ary) ? array_reduce($ary, 'cb', 0) : 1);
/PHP-7.2/Zend/tests/
H A Dbug67856.phpt2 Bug #67856 (Leak when using array_reduce with by-ref function)
6 var_dump(array_reduce($array, function(&$a, &$b) {
/PHP-7.2/ext/standard/
H A Dphp_array.h76 PHP_FUNCTION(array_reduce);
H A Dbasic_functions.c3349 PHP_FE(array_reduce, arginfo_array_reduce)
H A Darray.c5912 PHP_FUNCTION(array_reduce) argument
/PHP-7.2/ext/phar/tests/tar/files/
H A Dtarmaker.php.inc106 $checksum += array_reduce($checkheader, '_pear2tarchecksum');
H A Dcorrupt_tarmaker.php.inc113 $checksum += array_reduce($checkheader, '_pear2tarchecksum');
H A Dmake.dangerous.tar.php.inc107 $checksum += array_reduce($checkheader, '_pear2tarchecksum');
/PHP-7.2/
H A DNEWS829 . Fixed bug #75533 (array_reduce is slow when $carry is large array).
895 . Fixed bug #76778 (array_reduce leaks memory if callback throws exception).

Completed in 80 milliseconds