3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $ids = array ( 0 => array ( 0 => '2', 1 => '13', ), 1 => array ( ), 2 => array ( ), 3 => array ( ), 4 => array ( ), 5 => array ( ), 6 => array ( ), 7 => array ( ), 8 => array ( ), 9 => array ( ), 10 => array ( ), 11 => array ( ), ); print_r(array_reduce($ids, function($carry, $item) { var_dump($item); })); function myfunction($v1,$v2){ return $v1; } $a=array("A","B","C"); print_r(array_reduce($a,"myfunction"));
based on YIrX0
Output for 5.6.0 - 5.6.30, hhvm-3.15.4, 7.0.0 - 7.3.0alpha1
array(2) { [0]=> string(1) "2" [1]=> string(2) "13" } array(0) { } array(0) { } array(0) { } array(0) { } array(0) { } array(0) { } array(0) { } array(0) { } array(0) { } array(0) { } array(0) { }