3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Foo {} class Bar extends Foo { public function __construct() { parent::__construct(); } } new Bar();
based on bsAj0
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Error: Cannot call constructor in /in/W6jGj:8 Stack trace: #0 /in/W6jGj(12): Bar->__construct() #1 {main} thrown in /in/W6jGj on line 8
Process exited with code 255.
Output for 5.3.22 - 5.6.28
Fatal error: Cannot call constructor in /in/W6jGj on line 8
Process exited with code 255.