3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $var1=1; $var2=0; $var3=2; $var4=-1; $prefix="var"; for ($i=1;$i<=4;$i++) echo $$prefix$i;
Output for 5.4.0 - 5.5.4
Parse error: syntax error, unexpected '$i' (T_VARIABLE), expecting ',' or ';' in /in/QRdvB on line 9
Process exited with code 255.
Output for 5.3.0 - 5.3.27
Parse error: syntax error, unexpected T_VARIABLE, expecting ',' or ';' in /in/QRdvB on line 9
Process exited with code 255.