3v4l.org

run code in 300+ PHP versions simultaneously
<?php $map = ' \\ / / / / / \\ \\ \\ / \\ /\\ \\/ \\ / \\ \\ \\ \\ \\ \\ / /'; echo( r($map)['s']); function r($m){ $z=strpos($m,"/\\"); $z-=strrpos(substr($m,0,$z),"\n"); $ls=explode("\n",$m);$i=0; foreach($ls as $l){ $y=$i<count($ls)/2?0:1; foreach([0,1] as $x){ $s = substr($l,$x?($z-1):0,$x?$z*$z:$z); $a[$y+$x+($y?2:1)][] = strpos($s,"/")?"/":(strpos($s,"\\")?"\\":""); } $i++; } $n=1; foreach($a as $k=>$p){ $t=$p[$k<3?count($p)-1:0]; $s=0;$x=0;$b[$k]['s']=''; for($j=count($p)-1;$j>=0;$j--){ if($p[$j]){ $b[$k]['s'] .= strpad("",$j," ").($p[$j] === $t ? '/' : '_')."\n"; $s+=$p[$j]==$t?1:0; $x++; } } $b[$k]['t']=$s/$x; $n=$b[$k]['t']<$b[$n]['t']?$k:$n; } return $b[$n]; }
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught Error: Call to undefined function strpad() in /in/HbW3W:35 Stack trace: #0 /in/HbW3W(15): r(' ...') #1 {main} thrown in /in/HbW3W on line 35
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:
41.13 ms | 401 KiB | 8 Q