3v4l.org

run code in 300+ PHP versions simultaneously
<?php $var1=1; $var2=0; $var3=2; $var4=-1; for ($i=1;$i<=4;$i++) echo ${var$i};
Output for 5.4.0 - 5.4.20
Parse error: syntax error, unexpected 'var' (T_VAR) in /in/tL49D on line 7
Process exited with code 255.
Output for 5.3.0 - 5.3.27
Parse error: syntax error, unexpected T_VAR in /in/tL49D on line 7
Process exited with code 255.

preferences:
189.71 ms | 1395 KiB | 56 Q