Re: Re: cvs: php4 /ext/standard var.c /ext/wddx wddx.c

From: Date: Thu, 22 Jun 2000 11:20:42 +0000
Subject: Re: Re: cvs: php4 /ext/standard var.c /ext/wddx wddx.c
References: 1 2  Groups: php.dev 
Request: Send a blank email to php-dev+get-21955@lists.php.net to get a copy of this message
On Thu, Jun 22, 2000 at 01:02:51PM +0200, Sascha Schumann wrote: > On Thu, 22 Jun 2000, Stanislav Malyshev wrote: > > > >> so what is our conclusion? IMHO we should keep the class name > > >> around somehow, even if the class code is not availlabe > > >> during deserialisation. > > Thies, we agreed on that yesterday already :) maybe i was misled by misreading shane's and zeev's comment. > > Now we need to move forward. Can you address this point > somehow: > > We do not agree on: > > - PHP must stop script execution and output a misleading > error message, if the script defines a class and if this > class was absent on one or more object instantiations. i'm still not too happy about the fact that after you deserialize an object whilst it's class code is not yet available you would be able to create a class with just that name, but the (already) deserialized object wouldn't be able to use it (the code from the "now created" class). but this is personal taste - (so we don't need to argue this at all;-) > > > If this is what to be done, I propose creating array of hidden objects for > > session, and creating a "fake" classes for them, with name like > > "\1Foo_class\1" or something alike - not easily reachable by > > coincidence. These objects (and classes) even haven't to be registered > > with main class table, I think. You can just keep them around in the > > session for serializing later. > > So, then we have three proposed ways of preserving the class > name: > > - encode the original class name in the object's class name that would be expensive ('cause we need to create empty classes for every unkonwn class) > - rename class to stdClass and store the original name in a > normal HashTable don't think that would work. how would you do the zval <-> real-class_name mapping? > - rename class to stdClass and store the original name in a > member of the instantiated object not perfect - but would work. the only think i don't like about this that that we'll have some "hack" that would be visible in userland. so i'd be for the last one. tc > > - Sascha -- Thies C. Arntzen "One Big-Mac, Small Fries and a Coke!" Digital Collections Phone +49 40 235350 Fax +49 40 23535180 Hammerbrookstr. 93 20097 Hamburg / Germany

« previous php.dev (#21955) next »