--TEST-- Lazy objects: initialization of proxy does not change the class of the object --FILE-- newLazyProxy(function (B $o) { return new A(); }); var_dump(get_class($o)); $o->foo(); $o->s = 'init'; var_dump(get_class($o)); $o->foo(); ?> --EXPECT-- string(1) "B" string(6) "B::foo" string(1) "B" string(6) "B::foo"