Source: www.amitmerchant.com

Constructor Property Promotion in PHP 8

Category: PHP, javascript

A blog on PHP, JavaScript and more Amit Merchant · June 9, 2020 · ⋆ PHP Wouldn’t it be nice if you don’t have to declare the class property over and over again just to use it across the class?

According to this RFC (which is accepted), Constructor Property Promotion is coming in PHP 8. With the use of constructor property promotion, it will be really easy to declare class properties by just declaring and defining properties all in one place.

Follow me on Twitter @amit_merchant Constructor Property Promotion in PHP 8 Try not to use ad blockers, please!
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge. Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge.
Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Shirts painstakingly handcrafted by under-caffeinated developers. Shirts painstakingly handcrafted by under-caffeinated developers.
Community Partners