class Father { public function pocketMoney() { return 'Take this 500 $'; } } class Elder extends Father { public function myEarning() { echo "Father told me ".parent::pocketMoney(); } } class Younger extends Father { public function myEarning() { echo "Father told me ".parent::pocketMoney(); } } $elder = new Elder(); $elder->myEarning(); // output Father told me Take this 500 $ $younger = new Younger(); $younger->myEarning(); // output Father told me Take this 500 $
Friday, February 21, 2014
PHP oops Hierarchical Inheritance Example
Labels:
php oops
Subscribe to:
Post Comments (Atom)
This is single inheritance connected in parallel keeping the base class common.perfect explanation hierachical inheritance.its very useful.thanks for your valuable information.list of java training institutes in chennai | top 10 java training institutes in chennai
ReplyDeleteWere a gaggle of volunteers as well as starting off a brand new gumption within a community. Your blog furnished us precious details to be effective on. You've got completed any amazing work!
ReplyDeleteDigital Marketing Training in Chennai
Digital Marketing Training in Bangalore
Thanks for your informative article, Your post helped me to understand the future and career prospects & Keep on updating your blog with such awesome article.
ReplyDeletepython training institute in chennai
python training in Bangalore
python training in pune
I would assume that we use more than the eyes to gauge a person's feelings. Mouth. Body language. Even voice. You could at least have given us a face in this test.
ReplyDeleteData Science training in rajaji nagar
Data Science training in chennai
Data Science training in electronic city
Data Science training in USA
Data science training in pune
Data science training in kalyan nagar
Your story is truly inspirational and I have learned a lot from your blog. Much appreciated.
ReplyDeletejava training in chennai | java training in bangalore
java online training | java training in pune
This is a terrific article, and that I would really like additional info if you have got any. I’m fascinated with this subject and your post has been one among the simplest I actually have read.
ReplyDeleteangularjs-Training in pune
angularjs-Training in chennai
angularjs Training in chennai
angularjs-Training in tambaram
angularjs-Training in sholinganallur
I likable the posts and offbeat format you've got here! I’d wish many thanks for sharing your expertise and also the time it took to post!!
ReplyDeleteMicrosoft Azure online training
Selenium online training
Java online training
Java Script online training
Share Point online training