3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $all = array(array("class"=>array(array("peter","15","male"),array("mary","24","female"),array("jason","22","male")))); function merge($prev,$now){ return array_merge($prev,$now['class']); } $cc = array_reduce($all,"merge",array());
based on avPtY
Output for 4.3.0 - 5.0.2, 5.3.0 - 7.1.0
Output for 5.0.3 - 5.2.17
Warning: array_merge(): Argument #1 is not an array in /in/iZ6ff on line 4