-
Video : Classes, properties, objects in PHP
-
Video : Classes, properties, objects part 2
-
Video : Constructor in PHP
-
Video : Inheritance in object-oriented programming in PHP
-
Video : Method overriding in php
-
Video : Access Modifiers in php
-
Video : Access Modifiers part 2 in php
-
Video : Scope Resolution operator in PHP
-
Video : Interfaces in PHP | OOP in PHP
-
Video : Final Keyword in php
-
Video : Abstract class and method in PHP
Final Keyword in php
Please Login and enroll in this course to view the lesson.
Final keyword in PHP, yes we discuss the final keyword in this video you can better understand where and how can we use it.
class Cars{
public function myMethod()
{
echo 'My method here';
}
final function myMethod2(){
echo 'Parent Method';
}
}
class Honda extends Cars{
function myMethod2()
{
echo 'Child Method..';
}
}
$obj = new Honda();
$obj->myMethod2();