π In today's PHP workshop, we will see why the promoted constructor property is game-changing in PHP 8!
Adding the access modifier (public
, protected
, private
) before the property name will tell PHP to treat the constructor arguments as "property promotions".
Happy coding! π€ I'm sure you will love using this feature in your next PHP 8+ project π
π If you wish to go further, my Udemy course teaching how to build a complete PHP 8 application from scratch is now available: https://www.udemy.com/course/create-real-world-php-webapp-from-scratch/
Top comments (1)
And you? π€ What's your opinion?