What is final class and final method in php?



What is final class and final method in php?..

Answer / Abhinaw Kumar Rai

In PHP, 'final' is a keyword used to prevent a class or method from being extended. A final class cannot be extended by any other class. A final method can only be overridden within the same class. This provides a way to enforce restrictions on code modifications.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More PHP Interview Questions

Which will start a session?

1 Answers  


which will print out the php call stack?

1 Answers  


I need to know about the courses which are useful in corporate companies.. especially php/mySQL, Java/j2ee, .NET.. also tell if any other courses are valuable

1 Answers  


What is a simple php method to make a cross domain data request?

1 Answers  


Which variable declarations within a class is invalid in php?

0 Answers  


What is print_r?

1 Answers  


How to redirect https to http url through .htaccess?

1 Answers  


Which is useful for method overloading?

1 Answers  


What are escaping characters? Explain with an example?

1 Answers  


Why is used in php?

1 Answers  


How is it possible to parse a configuration file?

1 Answers  


Does mysql need php?

1 Answers  


Categories