[Part 04] PHP OOP Tutorial Series in Urdu | Multilevel Inheritance in php oop | Inheritance in OOP

preview_player
Показать описание
Please watch: "Part 00 | Redux JS Tutorial Series in Urdu/Hindi | Introduction to Redux JS with Example"
Hello Friends,
Welcome to Part 04 of Object Oriented Programming using PHP in Urdu 2017 by Perfect Web Solutions.
In this video tutorial you will learn multi level inheritance in php oop

In object-oriented programming, inheritance enables new objects to take on the properties of existing objects. A class that is used as the basis for inheritance is called a superclass or base class. A class that inherits from a superclass is called a subclass or derived class

Derived classes in a class hierarchy can sometimes be used interchangeably with their base class, a process called inheritance-based polymorphism. This approach combines the best features of interface-based polymorphism with the option of reusing or overriding code from a base class.

If you like the video, then please do like the video and do subscribe to my channel for more videos.

Visit our Fan Page on Twitter: @pwsjlmpk
Комментарии
Автор

My Concept about multilevel inheritence is now cleared, Way of explaining is AWESOME !
Thanks Sir

aliqureshi
Автор

sir men ne kafi practice ki hai, men ne conclusion nikala hai, check kren yeh theek hai kya

public fields and methods cannot be overriden as protected in child class
we can override proteced fields and methods to public fields and methods from parent to child class
THERE IS NOT DIRECT MULTIPLE INHERITENCE IN PHP
THERE IS ONLY MULTILEVEL INHERITENCE IN PHP
$this-> can access public protected fields and methods from anywhere except private fields and methods
self:: can access public methods only
WE CANNOT OVERRIDE THE PARENT CLASS VARIALBES AS PRIVATE

dfordemo
Автор

sir ye $_name method jo k app ne parent class me declare kiya han ye ku inherit ho rha han child class me bcz it is private?
then ye inherit ku ho rha han???

__Life
Автор

wish this series is translate into english

ARAR-xfho
Автор

haris javed
5 minutes ago
ok...see this...
<?php
class father
{
private $name;
}
class son extends father
{
public function showname($name)
{
$this->name = $name;
}
public function getname()
{
return $this->name;
}
}
$s = new son();
$s->showname('perfect Web Sollution');
$n = $s->getname();
echo $n;


?>
without public method i m able to access the private property in the child class...???how??

__Life
join shbcf.ru