Object Oriented Programming in PHP: The Way to Large PHP Projects - Page 9

Entering a Danger Zone

When you serialize an object you get a string which has a certain format, you may investigate
it if you are curious, one of the things the string has is the name of the class (nice!)
you may extract it using:

What you get is a new object of class Something created the same way as using new, the
constructor is called, etc.
I don't know if this is useful for you, but the Universe class which knows the name
of the derived class is a nice concept to experiment.
The only limit is your imagination.