Promoted Properties¶
Promoted properties are a class’s arguments, which are declared as properties and automatically assigned their value at instantiation.
<?php
// Show all information, defaults to INFO_ALL
phpinfo();
?>
See also Class constructor property promotion
Added in PHP 8.0