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/Od6LI:15 Stack trace: #0 /in/Od6LI(21): MyTest->__construct() #1 {main} thrown in /in/Od6LI on line 15
Process exited with code 255.
Output for 5.3.7 - 5.6.28
in parent Fatal error: Call to undefined method Test::construct() in /in/Od6LI on line 15
Process exited with code 255.