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(){ Test::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/PqAhX:16 Stack trace: #0 /in/PqAhX(22): MyTest->__construct() #1 {main} thrown in /in/PqAhX on line 16
Process exited with code 255.
Output for 5.0.0 - 5.6.28, hhvm-3.10.0 - 3.12.0
in parent Fatal error: Call to undefined method Test::construct() in /in/PqAhX on line 16
Process exited with code 255.
Output for 4.3.0 - 4.4.9