3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a = array( array( 'week' => 26, '#orders_CA' => 0, 'cost_CA' => 0, '#orders_US' => 3, 'cost_US' => 18.99, '#orders_INTERNATIONAL' => 0, 'cost_INTERNATIONAL' => 0 ), array( 'week' => 26, '#orders_CA' => 0, 'cost_CA' => 0, '#orders_US' => 0, 'cost_US' => 0, '#orders_INTERNATIONAL' => 22, 'cost_INTERNATIONAL' => 32 ), ); print_r(array_reduce($a, 'array_sum'));
Output for 5.3.0 - 7.1.0
Warning: array_sum() expects exactly 1 parameter, 2 given in /in/ooLfW on line 22 Warning: array_sum() expects exactly 1 parameter, 2 given in /in/ooLfW on line 22
Output for 4.3.3 - 5.2.17
Warning: Wrong parameter count for array_sum() in /in/ooLfW on line 22 Warning: Wrong parameter count for array_sum() in /in/ooLfW on line 22
Output for 4.3.0 - 4.3.2
Warning: Wrong parameter count for array_sum() in /in/ooLfW on line 22