The child class extends parent class means that it borrows properties and methods from its parent
class User {
public function მარტივიჯამი($num1,$num2) {
return $num1 + $num2;
}
}
class Admin extends User{
}
$admin1 = new Admin('Tom');
echo $admin1->მარტივიჯამი(4,5);
by Valeri Tandilashvili
4 years ago
PHP
OOP
Object Oriented PHP Tutorial
1
Pro tip: use ```triple backticks around text``` to write in code fences