Object ID

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

 



Hi,

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

The ID number is the one produced when dumping:
<?php
class A {}
class B {}
$a = new A();
$b = new B();
var_dump($a);
var_dump($b);
?>
=== output:
object(A)#1 (0) {
}
object(B)#2 (0) {
}

I do not want to buffer and parse the dumped string... Is there a nicer way?

-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