Re: Object ID

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Roman Neuhauser wrote:
How can I get the object ID number of each Object in PHP (v.5.2) ?

http://cz2.php.net/manual/en/function.spl-object-hash.php

Thanks!!! That is exactly what I need... :-)

<?php
class A {}
class B {}
$a = new A();
$b = new B();
var_dump(spl_object_hash($a));
var_dump(spl_object_hash($b));
?>
=== output:
string(32) "eaa76ef5378142caec7b40b56e4b6314"
string(32) "6168ec2b9db13132570a79ef04104e3c"

-thanks!

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux