Use spl_object_hash() for that.
It returns an unique identifier for each object instance, and not the name of the class, so it seems more suitable for you.
Edit:
For PHP < 5.2.x users, see this answer.
Use spl_object_hash() for that.
It returns an unique identifier for each object instance, and not the name of the class, so it seems more suitable for you.
Edit:
For PHP < 5.2.x users, see this answer.