PHP OOP Bangla Tutorial part-7 (Inheritance and Construct/destruct)
Inheritance and Construct/destruct
Parent class constructor/destructor are not implicitly called if the child class defines them as well. In order to run a parent constructor (or destructor), a call to parent::__construct() within the child constructor is required. If the child does not define a constructor then it may be inherited from the parent class just like a normal class method.
parent keyword
Similar to 'self' keyword which is used to access class level static and constant features, parent is used to access super class level features from subclass that includes construct/destruct and overridden methods (next topic).
Watch video PHP OOP Bangla Tutorial part-7 (Inheritance of Construct/destruct) online without registration, duration hours minute second in high quality. This video was added by user Code With Mehedi 15 August 2018, don't forget to share it with your friends and acquaintances, it has been viewed on our site 566 once and liked it 17 people.