How to indentify an object? ( Like hashcode() in java )
Moderator: General Moderators
How to indentify an object? ( Like hashcode() in java )
Is there something in PHP you can call on an object that will let you identifiy that specific object, like the default hashcode method in java?
you can print it:
And it will print Object Id #12 or whatever, but this may not always be supported.
Code: Select all
print($obj)- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
There are functions/classes here:
http://www.php.net/manual/en/ref.classobj.php
http://us2.php.net/manual/en/language.o ... ection.php (why don't the put this section in the main manual !?%#*&)
http://www.php.net/manual/en/ref.classobj.php
http://us2.php.net/manual/en/language.o ... ection.php (why don't the put this section in the main manual !?%#*&)
(#10850)