3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = 1; $$a = 1; ${$a++} = 2; var_dump($1); var_dump($a); var_dump($2);
Output for 5.4.18 - 5.4.19
Parse error: syntax error, unexpected '1' (T_LNUMBER), expecting variable (T_VARIABLE) or '$' in /in/QR5AH on line 5
Process exited with code 255.
Output for 5.4.0 - 5.4.17
Parse error: syntax error, unexpected '1' (T_LNUMBER), expecting variable (T_VARIABLE) or '$' in /in/2PC9C on line 5
Process exited with code 255.
Output for 5.3.0 - 5.3.27
Parse error: syntax error, unexpected T_LNUMBER, expecting T_VARIABLE or '$' in /in/2PC9C on line 5
Process exited with code 255.

preferences:
182.64 ms | 1399 KiB | 55 Q