Object ID



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!
.



Relevant Pages

  • Re: PHP Read Text File
    ... I have a php page that reads the contents of a file and then ... Consider dumping the lines into a mysql table and ... searching that way. ...
    (comp.lang.php)
  • Re: PHP Read Text File
    ... On Apr 19, 6:56 pm, venti ... I have a php page that reads the contents of a file and then ... Consider dumping the lines into a mysql table and ...
    (comp.lang.php)
  • Re: PHP Read Text File
    ... On Apr 19, 6:56 pm, venti ... I have a php page that reads the contents of a file and then ... Consider dumping the lines into a mysql table and ...
    (comp.lang.php)
  • Re: PHP Read Text File
    ... I have a php page that reads the contents of a file and then ... Consider dumping the lines into a mysql table and ... searching that way. ...
    (comp.lang.php)
  • Re: very simple drop-down list...
    ... Yep quiet right, had no PHP to test with before, but now I do and this ... OP says he tried dumping the query results and got what he expected, ...
    (comp.lang.php)