Which PHP 8 feature reduces boilerplate by declaring and assigning properties in the constructor signature?
- A Named arguments
- B Constructor property promotion
- C Union types
- D Attributes
Answer
Constructor property promotion
Promotion combines the property declaration, constructor parameter and assignment into one line, which is especially useful for value objects.





