3v4l.org

run code in 300+ PHP versions simultaneously
<?php $n = 5; $str = "-1 -14 5 -61 -2"; $e = ""; $m = "-"; $s = 0; for($i = 0, $len = strlen($str); $i < $len; $i++ ) { if(is_numeric($str[$i])) { $result[$s] .= $e . $str[$i]; } else { if($m == $str[$i]) { $e = $m; } else { $e = ""; $s++; } } } for($i = 0; $i < $n; $i++) { echo $result[$i] . "\n"; }
Output for git.master, git.master_jit, rfc.property-hooks
Warning: Undefined variable $result in /in/0Xun0 on line 9 Warning: Undefined array key 0 in /in/0Xun0 on line 9 Warning: Undefined array key 1 in /in/0Xun0 on line 9 Warning: Undefined array key 2 in /in/0Xun0 on line 9 Warning: Undefined array key 3 in /in/0Xun0 on line 9 Warning: Undefined array key 4 in /in/0Xun0 on line 9 -1 -1-4 5 -6-1 -2

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.21 ms | 402 KiB | 8 Q