3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { static private $var = "Hello"; public __construct() { $a = "var"; echo($this->$a); } } new A();
Output for 5.4.2 - 5.4.45, 5.5.24 - 5.5.29, 5.6.8 - 5.6.13
Parse error: syntax error, unexpected '__construct' (T_STRING), expecting variable (T_VARIABLE) in /in/GsgJq on line 5
Process exited with code 255.

preferences:
196.3 ms | 1395 KiB | 62 Q