3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public static $var = "Hello"; public function output() { $a = "var"; echo($this::$a); } } var $a = new A(); $a->output();
Output for 5.4.7 - 5.4.45, 5.5.24 - 5.5.29, 5.6.8 - 5.6.13
Parse error: syntax error, unexpected 'var' (T_VAR) in /in/sIQVG on line 10
Process exited with code 255.

preferences:
181.08 ms | 1395 KiB | 57 Q