Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Promoted Properties Compatibility

<?php

interface i {
    // no promoted property
    function __construct(int $a);
}

class x implements i {
    // promoted property
    function __construct(private int $a) {}
}

class y extends x {
    // valid extension of a promoted property
    function __construct(int $a) {}
}

?>

Promoted properties are defined in a constructor signature. They cannot be defined in an abstract method, so they are not allowed in an abstract constructor: this is true in an abstract class and in an interface.

On the other hand, it is allowed to extend promoted properties without the promotion, and vice versa.

See Also

PHP Features

Last updated: 10 September 2026