3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $x=$y=0;$d[0][0]=1;$q=file(c)[0];for(;$q[$p];){$z=$q[$p++];if($z=='<')$x--;if($z=='>')$x++;if($z=='^')$y++;if($z==v)$y--;if($d[$x][$y]++<1)$t++;}echo$t;
Output for 7.2.0
Warning: Use of undefined constant c - assumed 'c' (this will throw an Error in a future version of PHP) in /in/sXk8n on line 1 Warning: file(c): failed to open stream: No such file or directory in /in/sXk8n on line 1 Notice: Undefined variable: p in /in/sXk8n on line 1 Notice: Undefined variable: t in /in/sXk8n on line 1
Output for 5.4.10 - 7.1.10
Notice: Use of undefined constant c - assumed 'c' in /in/sXk8n on line 1 Warning: file(c): failed to open stream: No such file or directory in /in/sXk8n on line 1 Notice: Undefined variable: p in /in/sXk8n on line 1 Notice: Undefined variable: t in /in/sXk8n on line 1
Output for 5.3.20 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/sXk8n on line 1
Process exited with code 255.