3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Test{ //public $array; function __construct(){ print("in parent"); } } class MyTest extends Test{ function __construct(){ parent::construct(); print("in child"); } } $parent = new Test(); $child = new MyTest(); ?>
Output for 7.0.0 - 7.1.0
in parent Fatal error: Uncaught Error: Call to undefined method Test::construct() in /in/WtFns:16 Stack trace: #0 /in/WtFns(22): MyTest->__construct() #1 {main} thrown in /in/WtFns on line 16
Process exited with code 255.
Output for 5.0.0 - 5.6.28
in parent Fatal error: Call to undefined method Test::construct() in /in/WtFns on line 16
Process exited with code 255.
Output for 4.3.0 - 4.4.9