/php-src/ext/standard/tests/array/ |
H A D | array_reduce.phpt | 2 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 D | array_reduce_variation3.phpt | 2 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 D | bug40709.phpt | 2 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 D | bug24980.phpt | 2 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 D | array_reduce_variation1.phpt | 2 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 D | array_sum_empty_array.phpt | 10 echo "array_reduce() version:\n"; 11 var_dump(array_reduce($input, fn($carry, $value) => $carry + $value, 0)); 16 array_reduce() version:
|
H A D | array_product_empty_array.phpt | 10 echo "array_reduce() version:\n"; 11 var_dump(array_reduce($input, fn($carry, $value) => $carry * $value, 1)); 16 array_reduce() version:
|
H A D | array_product_variation6.phpt | 12 echo "array_reduce() version:\n"; 13 var_dump(array_reduce($input, fn($carry, $value) => $carry * $value, 1)); 18 array_reduce() version:
|
H A D | array_sum_variation9.phpt | 12 echo "array_reduce() version:\n"; 13 var_dump(array_reduce($input, fn($carry, $value) => $carry + $value, 0)); 18 array_reduce() version:
|
H A D | array_product_variation5.phpt | 10 echo "array_reduce() version:\n"; 12 var_dump(array_reduce($input, fn($carry, $value) => $carry * $value, 1)); 22 array_reduce() version:
|
H A D | array_sum_variation8.phpt | 10 echo "array_reduce() version:\n"; 12 var_dump(array_reduce($input, fn($carry, $value) => $carry + $value, 0)); 22 array_reduce() version:
|
H A D | array_sum_objects_operation_no_cast_FFI.phpt | 17 echo "array_reduce() version:\n"; 18 var_dump(array_reduce($input, fn($carry, $value) => $carry + $value, 0)); 25 array_reduce() version:
|
H A D | array_reduce_return_by_ref.phpt | 2 Return by reference from array_reduce() callback 6 var_dump(array_reduce($array, function &($a, $b) {
|
H A D | array_sum_objects_operation_no_cast.phpt | 12 echo "array_reduce() version:\n"; 13 var_dump(array_reduce($input, fn($carry, $value) => $carry + $value, 0)); 22 array_reduce() version:
|
H A D | bug76778.phpt | 2 Bug #76778 (array_reduce leaks memory if callback throws exception) 6 array_reduce(
|
H A D | array_product_objects_operation_no_cast.phpt | 12 echo "array_reduce() version:\n"; 13 var_dump(array_reduce($input, fn($carry, $value) => $carry * $value, 1)); 24 array_reduce() version:
|
H A D | bug22463.phpt | 2 Bug #22463 (array_reduce() segfaults) 7 return (is_array($ary) ? array_reduce($ary, 'cb', 0) : 1);
|
H A D | bug74345.phpt | 27 array_reduce([], $cb);
|
/php-src/ext/zend_test/tests/ |
H A D | observer_zend_call_function_01.phpt | 17 // 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 D | bug67856.phpt | 2 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 D | uconverter_getstandards_basic.phpt | 15 assertTrue(array_reduce($standards, function($carry, $item) { return $carry && is_string($item); },…
|
/php-src/ext/phar/tests/tar/files/ |
H A D | tarmaker.php.inc | 106 $checksum += array_reduce($checkheader, '_pear2tarchecksum');
|
H A D | corrupt_tarmaker.php.inc | 113 $checksum += array_reduce($checkheader, '_pear2tarchecksum');
|
H A D | make.dangerous.tar.php.inc | 107 $checksum += array_reduce($checkheader, '_pear2tarchecksum');
|
/php-src/ext/standard/ |
H A D | basic_functions.stub.php | 1876 function array_reduce(array $array, callable $callback, mixed $initial = null): mixed {} function
|