3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class T{ private function __construct() {} } $x = new T;
based on Xq0A7
Output for 7.0.0 - 7.3.0
Fatal error: Uncaught Error: Call to private T::__construct() from invalid context in /in/fn5BI:7 Stack trace: #0 {main} thrown in /in/fn5BI on line 7
Process exited with code 255.
Output for hhvm-3.15.4
Fatal error: Uncaught Error: Call to private T::__construct() from invalid context in /in/fn5BI:7 Stack trace: #0 {main}
Process exited with code 255.
Output for 5.6.0 - 5.6.38
Fatal error: Call to private T::__construct() from invalid context in /in/fn5BI on line 7
Process exited with code 255.