Abstract Class and Abstract Method in PHP (Hindi)
Abstract Class and Abstract Method in PHP
Core PHP Tutorials:
HTML Tutorials :
CSS Tutorials:
SQL Tutorials:
Check Out Our Other Playlists:
SUBSCRIBE to Learn Programming Language !
Learn more about subject:
________________________________________________
If you found this video valuable, give it a like.
If you know someone who needs to see it, share it.
If you have questions ask below in comment section.
Add it to a playlist if you want to watch it later.
________________________________________________
T A L K W I T H M E !
Business Email: [email protected]
Youtube Channel:
Facebook:
Twitter:
Google Plus:
Website:
_______________________________________________
Make sure you LIKE, SUBSCRIBE, COMMENT, and REQUEST A VIDEO! 🙂
_______________________________________________
Tag: abstract class php, Server, Web Application, Create Web Application, WebSite, PHP, PHP in Hindi, PHP in Urdu, PHP tutorials, php tutorial for beginners full, php programming, php mysql tutorial, Advance PHP, PDO, PHP OOP
Xem thêm bài viết eSports: https://aomalley.org/esports
Nguồn: https://aomalley.org/
<?php
abstract class Shape{
protected $color;
abstract function calculateArea();
public function getColor(){
return $this->color;
}
}
class Rectangular extends Shape{
public $height;
public $width;
function calculateArea($color, $height, $width){
$this->color = $color;
$this->height = $height;
$this->width = $width;
return $this->height * $this->width;
}
}
class Circle extends Shape{
public $radius;
function calculateArea($color, $radius){
$this->color = $color;
$this->radius = $radius;
return $this->radius * 3.14;
}
}
$rect = new Rectangular();
echo $rect->calculateArea("red", 10, 20);
$cir = new Circle();
echo $cir->calculateArea("blue", 10);
?>
Fatal error: Declaration of Rectangular::calculateArea($color, $height, $width) must be compatible with Shape::calculateArea() in C:xampphtdocsoopdataabstractionData1.php on line 13
Good explanation sir. 🌻
Real life project example?
awesome explain
Thankyou sir, keep it up
nice bro…. keep it up
u have not explain abstract class and abstract method
Please include the topic of trigger and joins in php
sir hm abstract ko as a multiple inheritence use kr skty hain kya?
sir PHP me method overloading possible hai???? if yes , then how????
Sir plz reply me sir apka 6th point hum constructor ko bhi abstract or static function ko bhi abstract bna skte hai or unki defi. Child class mai kr skte hai . Ans me .
Thanks Sir.
Learned About Abstract Very Easily….
Thank You 🙂
What is the output of the following code?
abstract class Calc {
abstract public function calculate($param);
protected function getConst() { return 4; }
}
class FixedCalc extends Calc {
public function calculate($param) {
return $this->getConst() + $param;
}
}
$obj = new FixedCalc();
echo $obj->calculate(38);. Plz suggest ans
Buddy apko smjhnaa nh arha abstract class kia ha meaning kia ha or na hmain smjh arha ha