3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo(array $p, array $q): array { $r = [array_shift($p)]; foreach ($q as $x) { $r[] = $x; $r[] = array_shift($p); } return $r; } print_r( foo([210,11,12], ['-', '/']) ); print_r( foo([210,11,12,12], ['-','/','/']) );
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [0] => 210 [1] => - [2] => 11 [3] => / [4] => 12 ) Array ( [0] => 210 [1] => - [2] => 11 [3] => / [4] => 12 [5] => / [6] => 12 )

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