note 110242 added to function.spl-object-hash

From: Date: Thu, 04 Oct 2012 14:39:44 +0000
Subject: note 110242 added to function.spl-object-hash
Groups: php.notes 
Request: Send a blank email to php-notes+get-191128@lists.php.net to get a copy of this message
Changing the state of an object does not affect the result <?php class Foo { public $bar; } $foo_obj = new Foo; var_dump(spl_object_hash($foo_obj)); // changing the state of an object $foo_obj->bar = 'some value'; var_dump(spl_object_hash($foo_obj)); // same class, but another object $foo_obj2 = new Foo; $foo_obj2->bar = 'some value2'; var_dump(spl_object_hash($foo_obj)); ?> This will output something like: string(32) "000000007f6499d0000000006ac34943" string(32) "000000007f6499d0000000006ac34943" string(32) "000000007f6499d0000000006ac34943" ---- Server IP: 69.147.83.199 Probable Submitter: 83.246.218.42 ---- Manual Page -- http://www.php.net/manual/en/function.spl-object-hash.php Edit -- https://master.php.net/note/edit/110242 Del: integrated -- https://master.php.net/note/delete/110242/integrated Del: useless -- https://master.php.net/note/delete/110242/useless Del: bad code -- https://master.php.net/note/delete/110242/bad+code Del: spam -- https://master.php.net/note/delete/110242/spam Del: non-english -- https://master.php.net/note/delete/110242/non-english Del: in docs -- https://master.php.net/note/delete/110242/in+docs Del: other reasons-- https://master.php.net/note/delete/110242 Reject -- https://master.php.net/note/reject/110242 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#191128) next »