> And why not adding an extra keyword, such as: > > ``` > <?php > dynamic class Foo { } // Dynamic allowed > class Bar {} // Dynamic disallowed > ?> > ```
I am opposed. IMO it's not worth adding anything to the language to preserve this existing behavior other than allowing `__get`/`__set`, etc, which already exist for this purpose. Additionally, there are technical benefits to removing dynamic properties altogether, so I don't think we should "half" remove it. See https://wiki.php.net/rfc/deprecate_dynamic_properties#internal_impact. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php