Re: [PHP-DEV] Proposal for a RFC

This is only part of a thread. view whole thread
May 7, 2019 13:08 (Steven Wade)
Hi Marco,

> The alternative is to expand the reflection API with an array cast operation in there, and then migrate existing userland usages to that to retain BC.
That's an interesting proposal - adding new reflection abilities. Hm..
> In addition to that, as someone that used to write a lot of `__toString()` (and now doesn't do that anymore), a clear API and interfaced (non-magic) `toArray()` is more powerful and useful.
I see you and I hear you. After 12 years, still like the magic of PHP. I like that casting is quick, simple, and is less verbose when writing/reading. But I'm not opposed to further discussing possible solutions. If this gets to the RFC stage, I'd prefer it be the best option for the language and most likely to pass. -- Steven Wade