Re: [PHP-DEV] Convert ext/xml to use an object instead of resource

2019-02-12 Thread Bishop Bettini
On Tue, Feb 12, 2019 at 11:21 AM Sara Golemon wrote: > On Tue, Feb 12, 2019 at 10:18 AM Nikita Popov > wrote: > > Very much opposed to any kind of special handling for is_resource(). We > > used to do this for is_object() and __PHP_Incomplete_Class and I'm very > > happy to be rid of this specia

Re: [PHP-DEV] Convert ext/xml to use an object instead of resource

2019-02-12 Thread Christoph M. Becker
On 12.02.2019 at 17:04, Rowan Collins wrote: > On Tue, 12 Feb 2019 at 15:30, Bishop Bettini wrote: > >> +1 for movement away from resources, generally. >> >> Resources represent connections to external resources, in a manner that's >> opaque to userland [1]. Would it make sense to update is_reso

Re: [PHP-DEV] Convert ext/xml to use an object instead of resource

2019-02-12 Thread Sara Golemon
On Tue, Feb 12, 2019 at 10:18 AM Nikita Popov wrote: > Very much opposed to any kind of special handling for is_resource(). We > used to do this for is_object() and __PHP_Incomplete_Class and I'm very > happy to be rid of this special behavior. Let's not add is back in a new > place. > Agreed. Thi

Re: [PHP-DEV] Convert ext/xml to use an object instead of resource

2019-02-12 Thread Nikita Popov
On Tue, Feb 12, 2019 at 4:30 PM Bishop Bettini wrote: > On Tue, Feb 12, 2019 at 10:00 AM Nikita Popov > wrote: > >> The ext/xml extension currently has GC issues, see >> https://bugs.php.net/bug.php?id=76874. The tl;dr is that uses of >> xml_parser >> will usually result in a cyclic structure, b

Re: [PHP-DEV] Convert ext/xml to use an object instead of resource

2019-02-12 Thread Bishop Bettini
On Tue, Feb 12, 2019 at 11:04 AM Rowan Collins wrote: > On Tue, 12 Feb 2019 at 15:30, Bishop Bettini wrote: > > > +1 for movement away from resources, generally. > > > > Resources represent connections to external resources, in a manner that's > > opaque to userland [1]. Would it make sense to u

Re: [PHP-DEV] Convert ext/xml to use an object instead of resource

2019-02-12 Thread Rowan Collins
On Tue, 12 Feb 2019 at 15:30, Bishop Bettini wrote: > +1 for movement away from resources, generally. > > Resources represent connections to external resources, in a manner that's > opaque to userland [1]. Would it make sense to update is_resource (and > friends) to be aware that "resources" retu

Re: [PHP-DEV] Convert ext/xml to use an object instead of resource

2019-02-12 Thread Benjamin Eberlei
Johannes Schlüter schrieb am Di. 12. Feb. 2019 um 16:57: > On Di, 2019-02-12 at 10:29 -0500, Bishop Bettini wrote: > > Would it make sense to update is_resource > > (and friends) to be aware that "resources" returned from xml_parser_* > > are not resources proper, but rather resources nominal? >

Re: [PHP-DEV] Convert ext/xml to use an object instead of resource

2019-02-12 Thread Johannes Schlüter
On Di, 2019-02-12 at 10:29 -0500, Bishop Bettini wrote: > Would it make sense to update is_resource > (and friends) to be aware that "resources" returned from xml_parser_* > are not resources proper, but rather resources nominal? > > If userland needed to strictly determine what was a resource pro

Re: [PHP-DEV] Convert ext/xml to use an object instead of resource

2019-02-12 Thread Bishop Bettini
On Tue, Feb 12, 2019 at 10:00 AM Nikita Popov wrote: > The ext/xml extension currently has GC issues, see > https://bugs.php.net/bug.php?id=76874. The tl;dr is that uses of > xml_parser > will usually result in a cyclic structure, but resources do not support > cycle GC. This means that the user