On 02.07.2007 22:16, David wrote:
(Many apologies for the double e-mail. Ugh, I'm not used to hitting Reply To
All yet)

> I really don't want to be annoying but from the end user's POV > spl_object_hash sounds like a function which returns a hash but not
an
> identity. Any tiny chance it will be available as object_get_id in > PHP6? ;)

It does give the hash, which is unique for each object. In which form would you expect object_get_id to return object's identity? PHP doesn't have a type of "tuple of C pointer and long integer" ;)

Hmm. I think what Pavel is asking is just to make it clearer in the
documentation what spl_object_hash's purpose and workings are

That's fine, the docu team would gladly accept any help and patches.

and perhaps
make an alias to it named object_get_id so other people don't run into this
confusion in the future.

I'd like to avoid creating misleading aliases, which would not be usable on a shared hosting in the next 10 years anyway.

The name of spl_object_hash and the fact it is in the SPL and not in the
engine does lead one to believe that it might do more than simply hashing
the handler table and handle tuple. People might think it hashes the
properties as well.

People won't think anything like that if we fix the documentation, so let's do 
it.

--
Wbr, Antony Dovgal

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to