RE: [PHP-DEV] Exposing object handles to userland
| From: | Anatol Belski | Date: | Wed, 05 Jul 2017 08:38:45 +0000 |
| Subject: | RE: [PHP-DEV] Exposing object handles to userland | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-99756@lists.php.net to get a copy of this message | ||
Hi,
> -----Original Message-----
> From: Stanislav Malyshev [mailto:smalyshev@gmail.com]
> Sent: Wednesday, July 5, 2017 5:28 AM
> To: tyson andre <tysonandre775@hotmail.com>; internals@lists.php.net
> Subject: Re: [PHP-DEV] Exposing object handles to userland
>
> Hi!
>
> > - Can two objects can have the same object id
> > but different object handlers?
> > (e.g. iterators of some built in classes?)
> > I'm not familiar enough with PHP's history to be sure.
>
> Yes, if extension using non-standard handlers is in use.
>
> > - Can the the largest object handle be larger
> > than the size of
zend_long in 32-bit systems?
>
> Handle is uint32_t, so probably no.
>
On 32-bit zend_long is a signed 32-bit int, so it can theoretically overflow, while sizeof is same.
Regards
Anatol