DEV Community

Cover image for PHP 8.1 ReadOnly class properties
Pierre-Henry Soria ✨
Pierre-Henry Soria ✨

Posted on • Updated on

PHP 8.1 ReadOnly class properties

Today, we will learn how and why you can declare your class properties as readonly and how your code could be cleaner/shorter too πŸš€

More of my live programming videos at learning.ph7builder.com

My GitHub https://github.com/pH-7

πŸ‘‰ My Udemy course on how to build a real-world PHP 8.1 application from scratch - https://www.udemy.com/course/create-real-world-php-webapp-from-scratch/

Happy coding! 🀠

Discussion (0)