3v4l.org

run code in 300+ PHP versions simultaneously
<?php $rng1step = 3; $rng2step = 2; $max = 1000; $find = 553; $rng = range(1,$max); $i = 1; $range2=[]; While(count($rng)){ If($i){ $range1= array_merge($range1, array_splice($rng, 0, $rng1step)); $i = 0; }Else{ $range2= array_merge($range2, array_splice($rng, 0, $rng2step)); $i = 1; } } If(in_array($range1, $find)) echo "range1";
Output for git.master, git.master_jit, rfc.property-hooks
Warning: Undefined variable $range1 in /in/dmKN2 on line 15 Fatal error: Uncaught TypeError: array_merge(): Argument #1 must be of type array, null given in /in/dmKN2:15 Stack trace: #0 /in/dmKN2(15): array_merge(NULL, Array) #1 {main} thrown in /in/dmKN2 on line 15
Process exited with code 255.

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