3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class A { public function __construct() { A::a(); } public static function a() { static $a = new A; } } new A;
based on 8vmda
Output for 7.0.0 - 7.0.2
Fatal error: Constant expression contains invalid operations in /in/gMTLT on line 12
Process exited with code 255.
Output for 5.4.11 - 5.6.17
Parse error: syntax error, unexpected 'new' (T_NEW) in /in/gMTLT on line 12
Process exited with code 255.
Output for 5.3.21 - 5.3.29
Parse error: syntax error, unexpected T_NEW in /in/gMTLT on line 12
Process exited with code 255.