Possible Duplicate:
Get Instance ID of an Object in PHP
I'm new to OOP and I have an object. If I:
var_dump($obj);
I get:
object(stdClass)[55]
public 'date' => int 1295297161
public 'id' => int 11
How can I retrieve the "55"?
As others have mentioned you can't read it, without parsing the output of var_dump
. But if all you are looking for is a way to uniquely identify an object, then you should use spl_object_hash
.
精彩评论