3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class A { function __construct() { //return new stdClass(); } } $x = new A(); echo get_class($x); //echo get_class($x->__construct());
Output for 5.0.0 - 5.0.5, 5.1.1 - 5.6.26, hhvm-3.10.0 - 3.13.2, 7.0.0 - 7.1.0RC5
A
Output for 5.1.0
Fatal error: fatal flex scanner internal error--end of buffer missed in /in/UJ6kB on line 11
Process exited with code 255.
Output for 4.3.0 - 4.4.9
a