How does 'Constructor Property Promotion' simplify class definitions, and what are its limitations regarding inheritance?

Last updated 15 June 2026

  • Promotion (PHP 8.0+) declares and assigns a property in one step by adding a visibility keyword (public, protected, private) to a constructor parameter. No separate declaration or $this->x = $x line is needed.

  • It only works in __construct(). It is not allowed in abstract constructors, interfaces, or for callable types.

  • A child class with its own constructor must explicitly call parent::__construct() and re-pass the values. Promoted parent properties are not wired up automatically.

  • https://stitcher.io/blog/constructor-promotion-in-php-8
  • https://php.watch/versions/8.0/constructor-property-promotion
  • https://roman-huliak.medium.com/constructor-property-promotion-in-php-cleaner-and-more-elegant-classes-12c7524be55a
  • https://www.geeksforgeeks.org/php/constructor-property-promotion-in-php-8/
  • https://www.php.net/manual/en/language.oop5.decon.php
  • https://phpgrid.com/blog/php-8-constructor-property-promotion/
  • https://wiki.php.net/rfc/constructor_promotion
  • https://dev.to/asfiaaiman/a-beginners-guide-to-constructor-property-promotion-in-php-5p1
All PHP interview questions