Member-only story

PHP — P65: Final Keyword

Dino Cajic
Dev Genius
Published in
5 min readJul 3, 2022

--

PHP Final Keyword

The final keyword can be prefixed to methods and classes. If you prefix a method in the parent class, and the child class inherits the methods from the parent, the final keyword prevents the child class from overriding that method. If the class itself is prefixed with final, then no other class can extend that class.

View this article and others on my website.

Recap: Review where we left off in the previous article.

The final keyword isn’t that complicated of a concept. We pretty much covered everything you need to know in the intro paragraph, but let’s go through…

--

--

Published in Dev Genius

Coding, Tutorials, News, UX, UI and much more related to development

Written by Dino Cajic

Author of An Illustrative Introduction to Algorithms. IT Leader with a B.S. in Computer Science, a minor in Biology, and a passion for learning.

No responses yet

What are your thoughts?