Home
last modified time | relevance | path

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

12

/php-src/ext/standard/tests/array/
H A Darray_reduce.phpt2 Test array_reduce() function
9 echo "\n*** Testing array_reduce() to integer ***\n";
14 echo "\n*** Testing array_reduce() to float ***\n";
19 echo "\n*** Testing array_reduce() to string ***\n";
24 echo "\n*** Testing array_reduce() to array ***\n";
29 echo "\n*** Testing array_reduce() to null ***\n";
37 *** Testing array_reduce() to integer ***
41 *** Testing array_reduce() to float ***
45 *** Testing array_reduce() to string ***
49 *** Testing array_reduce() to array ***
[all …]
H A Darray_reduce_variation3.phpt2 Test array_reduce() function : variation - object callbacks
5 echo "*** Testing array_reduce() : variation - object callbacks ***\n";
15 var_dump(array_reduce($array, array("A", "adder")));
18 var_dump(array_reduce($array, array(new A(), "adder2")));
22 *** 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 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 Darray_reduce_variation1.phpt2 Test array_reduce() function : variation
5 echo "*** Testing array_reduce() : variation ***\n";
19 var_dump(array_reduce($array, "oneArg", 2));
23 var_dump(array_reduce($array, "threeArgs", 2));
30 *** Testing array_reduce() : variation ***
H A Darray_sum_empty_array.phpt10 echo "array_reduce() version:\n";
11 var_dump(array_reduce($input, fn($carry, $value) => $carry + $value, 0));
16 array_reduce() version:
H A Darray_product_empty_array.phpt10 echo "array_reduce() version:\n";
11 var_dump(array_reduce($input, fn($carry, $value) => $carry * $value, 1));
16 array_reduce() version:
H A Darray_product_variation6.phpt12 echo "array_reduce() version:\n";
13 var_dump(array_reduce($input, fn($carry, $value) => $carry * $value, 1));
18 array_reduce() version:
H A Darray_sum_variation9.phpt12 echo "array_reduce() version:\n";
13 var_dump(array_reduce($input, fn($carry, $value) => $carry + $value, 0));
18 array_reduce() version:
H A Darray_product_variation5.phpt10 echo "array_reduce() version:\n";
12 var_dump(array_reduce($input, fn($carry, $value) => $carry * $value, 1));
22 array_reduce() version:
H A Darray_sum_variation8.phpt10 echo "array_reduce() version:\n";
12 var_dump(array_reduce($input, fn($carry, $value) => $carry + $value, 0));
22 array_reduce() version:
H A Darray_sum_objects_operation_no_cast_FFI.phpt17 echo "array_reduce() version:\n";
18 var_dump(array_reduce($input, fn($carry, $value) => $carry + $value, 0));
25 array_reduce() version:
H A Darray_reduce_return_by_ref.phpt2 Return by reference from array_reduce() callback
6 var_dump(array_reduce($array, function &($a, $b) {
H A Darray_sum_objects_operation_no_cast.phpt12 echo "array_reduce() version:\n";
13 var_dump(array_reduce($input, fn($carry, $value) => $carry + $value, 0));
22 array_reduce() version:
H A Dbug76778.phpt2 Bug #76778 (array_reduce leaks memory if callback throws exception)
6 array_reduce(
H A Darray_product_objects_operation_no_cast.phpt12 echo "array_reduce() version:\n";
13 var_dump(array_reduce($input, fn($carry, $value) => $carry * $value, 1));
24 array_reduce() version:
H A Dbug22463.phpt2 Bug #22463 (array_reduce() segfaults)
7 return (is_array($ary) ? array_reduce($ary, 'cb', 0) : 1);
H A Dbug74345.phpt27 array_reduce([], $cb);
/php-src/ext/zend_test/tests/
H A Dobserver_zend_call_function_01.phpt17 // array_reduce() calls zend_call_function() under the hood
18 var_dump(array_reduce($a, 'sum'));
24 <!-- init array_reduce() -->
25 <array_reduce>
37 </array_reduce>
/php-src/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-src/ext/intl/tests/
H A Duconverter_getstandards_basic.phpt15 assertTrue(array_reduce($standards, function($carry, $item) { return $carry && is_string($item); },…
/php-src/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-src/ext/standard/
H A Dbasic_functions.stub.php1876 function array_reduce(array $array, callable $callback, mixed $initial = null): mixed {} function

Completed in 25 milliseconds

12