Re: [PHP-DEV] [RFC - discussion] __toArray()

This is only part of a thread. view whole thread
February 4, 2020 17:13 (Steven Wade)
> I think the motivation is exactly what you said. Allowing developers more control over how the object is treated when casted to an array - which would include when it is passed into an array_* function.
I couldn’t (and didn’t) have said it better myself. My motivation is really just to give developers more control over their code and allow them to have cleaner code.