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+1+($y?2:1); // $s = substr($l,0,$z-1); // $a[$y+0+$y?2:1]++;//[] = strpos($s,"/")?"/":(strpos($s,"\\")?"\\":""); // $s = substr($l,$z); // $a[$y+1+$y?2:1]++;//[] = strpos($s,"/")?"/":(strpos($s,"\\")?"\\":"");; $i++; } return $a; }
Output for git.master, git.master_jit, rfc.property-hooks
2222222444444array(4) { [1]=> int(0) [2]=> int(0) [3]=> int(0) [4]=> int(0) }

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