Re: [RFC] Deprecate dynamic properties
| From: | Levi Morrison via internals | Date: | Wed, 25 Aug 2021 14:18:34 +0000 |
| Subject: | Re: [RFC] Deprecate dynamic properties | ||
| References: | 1 2 3 4 5 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-115815@lists.php.net to get a copy of this message | ||
> 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.