On Wed, Aug 25, 2021 at 2:02 PM Ben Ramsey <ram...@php.net> wrote: > I'd feel better about this if we had that citation. In modern code, I > agree they are probably rare, but I think there's a lot of legacy code > that makes heavy use of dynamic properties as an important feature of > PHP. (I'm working on one such project right now.) >
I think a question worth asking is whether or not codebases such as that would have other similar challenges to targeting the intended version. If the actual removal of dynamic properties, as opposed to deprecation notice, is targeted for 9.0, it would be safe to assume that older codebases will already need to do significant work to migrate to that version. I don't say this to mean that BC breaking doesn't have an impact, but rather, it's important to consider if other changes already force design updates to old codebases when considering impact. We would want to make migration to newer versions as easy as possible, so providing an escape hatch makes sense. But I think most developers would anticipate that moving major versions might result in changes such as this that could be breaking. Since __get/__set provides an escape hatch and stdClass does as well, I personally would think that the possible internal optimizations it enables which Nikita detailed are worth breaking some legacy userland code for a major version increment. Jordan