problem unserializing objects

From: Date: Wed, 05 Jul 2000 22:10:05 +0000
Subject: problem unserializing objects
Groups: php.general 
Request: Send a blank email to php-general+get-5086@lists.php.net to get a copy of this message
In php4.0.1pl2, how can I determine the type of an unserialized object that no class has yet been defined for? Do I have to manually parse the serialized string? In php3 and 4.0.0 I could access the variables of the unserialized object, one of which I set to be the type of the object, then I could include the appropriate class file and create the object at runtime. In php4.0.1pl2 this is not permitted. It's not an option to include every possible class that the serialized object could be before unserializing the object. Is there a built-in function or way of doing this? It doesn't feel right to manually parse the serialized string for the class name as the serialized string is supposed to be opaque! get_class() returns __PHP_Incomplete_Class so that doesn't work. Jason

« previous php.general (#5086) next »