How to call parent constructor in PHP

How to call parent class constructor in PHP:

class MyClass extends OtherClass
{
public function __construct()
{
// your custom code
parent::__construct(); // parent constructor call
}
}

 

Comments

No comments yet, you can leave yours: