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_unique', $a));
Output for 7.0.0 - 7.1.0
Warning: array_unique() expects parameter 2 to be integer, array given in /in/8YCvF on line 23 Warning: array_unique() expects parameter 1 to be array, null given in /in/8YCvF on line 23
Output for hhvm-3.12.0
Warning: array_unique() expects parameter 2 to be integer, array given Warning: array_unique() expects parameter 2 to be integer, array given
Output for hhvm-3.10.0

Process exited with code 153.
Output for 5.3.0 - 5.6.28
Warning: array_unique() expects parameter 2 to be long, array given in /in/8YCvF on line 23 Warning: array_unique() expects parameter 1 to be array, null given in /in/8YCvF on line 23
Output for 5.2.9 - 5.2.17
Warning: array_unique() expects parameter 2 to be long, array given in /in/8YCvF on line 23 Warning: array_unique() expects parameter 2 to be long, array given in /in/8YCvF on line 23
Output for 4.3.0 - 5.2.8
Warning: Wrong parameter count for array_unique() in /in/8YCvF on line 23 Warning: Wrong parameter count for array_unique() in /in/8YCvF on line 23