FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » object id - where?
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: object id - where? [message #177930 is a reply to message #177902] Fri, 27 April 2012 20:07 Go to previous messageGo to previous message
Thomas Mlynarczyk is currently offline  Thomas Mlynarczyk
Messages: 131
Registered: September 2010
Karma:
Senior Member
M. Strobel schrieb:

> is there something like an object id accessible?

You can use === to check if two variables refer to the same object:

$a = new stdclass;
$a->foo = 42;
$b = new stdclass;
$b->foo = 42;
$c = $a;
var_dump( $a === $b, $a === $c, $b === $c );

Result:
false, true, false

Greetings,
Thomas

--
Ce n'est pas parce qu'ils sont nombreux à avoir tort qu'ils ont raison!
(Coluche)
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Stats comp.lang.php (last 7 days)
Next Topic: Webhosting, Domain Name, Data Center Cyprus, Hosting Services
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Thu May 08 23:37:36 GMT 2025

Total time taken to generate the page: 0.15332 seconds