Re: [RFC - discussion] __toArray()
| From: | Steven Wade | Date: | Tue, 04 Feb 2020 17:13:28 +0000 |
| Subject: | Re: [RFC - discussion] __toArray() | ||
| References: | 1 2 3 4 5 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-108396@lists.php.net to get a copy of this message | ||
> 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.