Re: [PHP] Object ID
- From: ceo@xxxxxxxxx ("Richard Lynch")
- Date: Wed, 14 Feb 2007 17:59:05 -0600 (CST)
I suspect that's not an "absolute" ID, but just an ID for that
particular dump. So it has no applicability beyond that dump...
On Wed, February 14, 2007 11:31 am, Eli wrote:
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
--
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?
.
- Follow-Ups:
- Re: [PHP] Object ID
- From: Eli
- Re: [PHP] Object ID
- References:
- Object ID
- From: Eli
- Object ID
- Prev by Date: php/mysql syntax help
- Next by Date: Re: [PHP] Getting mysql_query results into an array
- Previous by thread: Re: [PHP] Object ID
- Next by thread: Re: [PHP] Object ID
- Index(es):
Relevant Pages
|