Subscribe to PHP Freaks RSS

PHP 8.0 feature focus: Attributes

syndicated from planet-php.net on November 11, 2020

Metaprogramming gets more meta in PHP 8.0. Last time, we looked at one of the three headline features of PHP 8.0: Constructor Property Promotion. Today, we’ll look at the second: Attributes. A history of change Some PHP changes are proposed, discussed, implemented, and approved in short order. They’re uncontroversial, popular, and have a natural way to implement them. And then there are the ones that are tried, fail, and come back multiple times before they are finally accepted.