3v4l.org

run code in 300+ PHP versions simultaneously
<?php $all = array(array("class"=>array(array("peter","15","male"),array("mary","24","female"),array("jason","22","male")))); print_r($all); function merge($prev,$now){ return array_merge($prev,$now['class']); } $cc = array_reduce($all,"merge",array()); print_r($cc);
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [0] => Array ( [class] => Array ( [0] => Array ( [0] => peter [1] => 15 [2] => male ) [1] => Array ( [0] => mary [1] => 24 [2] => female ) [2] => Array ( [0] => jason [1] => 22 [2] => male ) ) ) ) Array ( [0] => Array ( [0] => peter [1] => 15 [2] => male ) [1] => Array ( [0] => mary [1] => 24 [2] => female ) [2] => Array ( [0] => jason [1] => 22 [2] => male ) )

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
36.31 ms | 403 KiB | 8 Q