PHP – Constructor Property Promotion
In PHP 8, the constructor property promotion is a feature that was added that reduces the amount of code that needs to be typed for working with constructor properties. This feature can be beneficial by reducing the amount of typing that is needed to be done. Constructor property promotion works by removing the declaration of …