3v4l.org

run code in 300+ PHP versions simultaneously
<?php function MergeArrays($ar1, $ar2, $ar3) { $array = array(); $arrays = array('ar1', 'ar2', 'ar3'); foreach($arrays as $name) { //print_r($$name); foreach($$name as $id=>$value) $array[$id] = $value; } return $array; } $a1 = array('a', 'b'); $a2 = array('c', 'd', 'e'); $a3 = array('f'); print_r(MergeArrays($a, $a2, $a3));
Output for git.master_jit, git.master, rfc.property-hooks
Warning: Undefined variable $a in /in/cv5d4 on line 19 Warning: foreach() argument must be of type array|object, null given in /in/cv5d4 on line 9 Array ( [0] => f [1] => d [2] => e )

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:
44.5 ms | 401 KiB | 8 Q