Hi,

On Sep 23, 2013 at 3:05 PM, Joe Watkins <krak...@php.net> wrote:

> On 09/23/2013 02:43 PM, Lars Strojny wrote:
>
>> Hi Joe,
>>
>> what about serialization for those classes?
>>
>> cu,
>> Lars
>>
>>
> Same as any other object; what you are creating is normal classes without
> a (declared) name, nothing about the objects functionality has differs from
> an object of a named class.
>

I think that the question was: How would you figure out method
implementation for unserialized object of anonymous class? Consider this
example...

$o = new class() {
  private $a = 1;
  public function test() { echo $this->a; }
};
$o->test();
$str = serialize($o);
$o2 = unserialize($str);
$o2->test();

How would this work?

Jakub

Reply via email to