Re: Proposal: ArraySerializable interface
| From: | Marco Pivetta | Date: | Wed, 11 Dec 2013 02:43:28 +0000 |
| Subject: | Re: Proposal: ArraySerializable interface | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-70583@lists.php.net to get a copy of this message | ||
On 11 December 2013 03:37, Michael Dowling <mtdowling@gmail.com> wrote:
> I think this would be a great feature. PHP already casts objects to
> arrays, so being able to customize that behavior would be really helpful.
>
I'm actually wondering about the opposite case.
What would I have to do to have the previous behavior working on an
ArraySerializable instance (basically ignore __toArray() for one
particular cast)?
I don't want to go the reflection way :-)
Marco Pivetta
http://twitter.com/Ocramius
http://ocramius.github.com/