Hi Pavel,
Pavel Shevaev wrote:
Folks, is this really wanted behavior? Because if so, why does the
following result in the same hash as well(PHP-5.2.1)?
$ php -r "class Foo{};$foo = new
Foo();var_dump(spl_object_hash($foo));$foo->bar =
1;var_dump(spl_object_hash($foo));"
string(32) "d1f40a1cc04d8c79d09ae6262666adbb"
string(32) "d1f40a1cc04d8c79d09ae6262666adbb"
Because you calculate the hash for the same object. It does not matter,
that you changed a property, the $foo is still the same object.
Best regards,
Stephan
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php