The ‘final’ keyword, if present in a declaration, denotes that the current method does not support overriding by other classes. This is used when there is a requirement to create an immutable class.
Note: Properties cannot be declared as final. It is only the methods and classes that get to be final.
Next up on this core PHP interview questions and answers blog, let us take a look at the intermediate questions.
Intermediate PHP Interview Questions