3v4l.org

run code in 300+ PHP versions simultaneously
<?php $map = ' \\ / / / / / \\ \\ \\ / \\ /\\ \\/ \\ / \\ \\ \\ \\ \\ \\ / /'; var_dump( r($map)); function r($m){ $z=strpos($m,"/\\"); $z-=strrpos(substr($m,0,$z),"\n"); $ls=explode("\n",$m);$i=0; $a=[1=>0,2=>0,3=>0,4=>0]; foreach($ls as $l){ $y=$i<count($ls)/2?0:1;//echo $y+0+($y?2:1); $s = substr($l,0,$z-1); $a[$y+0+($y?2:1)][] = strpos($s,"/")?"1":(strpos($s,"\\")?"2":"3"); $s = substr($l,$z); $a[$y+1+($y?2:1)][] = strpos($s,"/")?"1":(strpos($s,"\\")?"2":"3"); $i++; } return $a; }
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught Error: Cannot use a scalar value as an array in /in/AUaEb:25 Stack trace: #0 /in/AUaEb(15): r(' ...') #1 {main} thrown in /in/AUaEb on line 25
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:
48.69 ms | 401 KiB | 8 Q