I have a number of classes which I instantiate and then serialize like this in one file and post out along with some form data.
$tempA = new ClassA();
$tempB = new ClassB();
$tempC = new ClassC();
// Set some variables etc
if (something)
{
$data = urlencode(serialize($tempA));
}
elseif (somethingelse)
{
$data = urlencode(serialize($temp😎);
}
else
{
$data = urlencode(serialize($tempC));
}
Later on (in a second file), I retrieve this information like this:
$getdata = unserialize(urldecode($data));
Clear? I'm not sure if I'm getting this across correctly...
Right then, how can I tell which CLASS it was from the unserialized information? Was it ClassA, ClassB or ClassC ?
Thanks in advance
Richard