Re: New handler for retrieving properties when object is serialized

From: Date: Thu, 25 Jul 2013 23:01:18 +0000
Subject: Re: New handler for retrieving properties when object is serialized
References: 1 2 3 4 5  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
On Thu, 2013-07-25 at 21:01 +0100, Jakub Zelenka wrote:
> On Thu, Jul 25, 2013 at 8:56 PM, Stas Malyshev <[email protected]>wrote:
> 
> 
> > You can create those properties when processing __sleep. Nothing
> > requires them to exist before __sleep was called.
> >
> >
> The problem is that properties will exist after __sleep was called. :)
> There are situations that you don't want them to exist (for example
> DateTime).

What about using our Serializable interface? - That was invented to
serialize internal objects with arbitrary internal data.

johannes




Thread (22 messages)

« previous php.internals (#68312) next »