<?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();
?>
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.