3v4l.org

run code in 300+ PHP versions simultaneously
<?php var $n = 123; echo gettype($n); echo gettype(settype($n,"integer")); echo gettype(settype($n,"string")); ?>
Output for 5.4.0 - 5.4.28
Parse error: syntax error, unexpected 'var' (T_VAR) in /in/aNUh3 on line 2
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_VAR in /in/aNUh3 on line 2
Process exited with code 255.

preferences:
192.38 ms | 1386 KiB | 65 Q