Re: Exposing object handles to userland
| From: | Nikita Popov | Date: | Tue, 11 Jul 2017 10:21:48 +0000 |
| Subject: | Re: Exposing object handles to userland | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-99832@lists.php.net to get a copy of this message | ||
On Tue, Jul 11, 2017 at 11:52 AM, Marco Pivetta <ocramius@gmail.com> wrote:
> Asking here, since it's not clear to me: is this a good/fitting
> replacement for
spl_object_hash()?
>
> On 11 Jul 2017 7:00 AM, "tyson andre" <tysonandre775@hotmail.com> wrote:
>
>> >> How long should I wait to see if there are objections before creating
>> a pull request?
>> >AFAIK you can create PR any time.
>>
>> I created a PR implementing spl_object_id(object $o) : int several days
>> ago,
>> at https://github.com/php/php-src/pull/2611
>> --
>> PHP Internals - PHP Runtime Development Mailing List
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
Yes. spl_object_id() provides the same guarantees as spl_object_hash() --
but is much faster and has a more compact output (an integer instead of an
iirc 32 byte string).
Nikita