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

This is only part of a thread. view whole thread
  108396
February 4, 2020 17:13 stevenwadejr@gmail.com (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.