In this tutorial, you will learn about final keyword and its uses in PHP.
If a class or method is declared with final can not be override or inherited by another class
Final
Keyword Use to Protect the code like Access modifier (private and protected). if you inherit a class having final
keyword then it will throw you an error.
See the below example
1 2 3 4 5 6 7 8 | <?php final class College { } class Student extends College { } ?> Output- Fatal Error |