Skip to main content

Command Palette

Search for a command to run...

Constructor Property Promotion with PHP 8

Updated
โ€ข1 min read
Constructor Property Promotion with PHP 8
P

I'm Pierre-Henry Soria. A passionate full stack engineer, building things that matter, making a real impact on the world.

Really like to take care of others and manage my workflow based on productivity methodologies.

Open to fast-paced changes with rapidly evolving business and technologies. I'm always thirsty to learn and undertake new exciting things and thrilling challenges.

๐Ÿ‘‰ In today's PHP video 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".

Psst! My Udemy course on how to build a real-example PHP 8 application from scratch is now available! https://www.udemy.com/course/create-real-world-php-webapp-from-scratch/

Happy PHP8 Coding! ๐Ÿค 

More from this blog

Super Passionate Software Engineer

37 posts

Pierre-Henry Soria. A super passionate & enthusiastic software engineer! ๐Ÿš€ True cheese & chocolate lover! ๐Ÿ˜‹ ๐Ÿ‘‰ Reach me at https://ph7.me ๐Ÿ’ซ