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] Make bcmath functions more strict

2019-02-12 Thread Legale.legale
Hello Vlad, internals. If you'll make an RFC someone will certainly vote :-) Meanwhile till php bureaucracy hasn't put quorum rule in the voting process you have a chance to push it through. Good luck.

Re: [PHP-DEV] reasonability of change the mbfl library

2019-02-12 Thread Legale Legage
Hello, internals. As Rowan Collins suggested i've replaced lookup table with simple macros: #define UTF16_LE_CODE_UNIT_IS_HIGH_SURROGATE (code_unit & 0xFC00 == 0xD800) #define UTF16_BE_CODE_UNIT_IS_HIGH_SURROGATE (code_unit & 0x00FC == 0x00D8) I repeated the benchmarks again. Here is the results:

Re: [PHP-DEV] Make bcmath functions more strict

2019-02-12 Thread Vladyslav Startsev
On Fri, Feb 8, 2019 at 1:07 AM Ben Ramsey wrote: > > > On Feb 7, 2019, at 11:47, Vladyslav Startsev > > wrote: > > > > Hello everyone! > > > > Recently I noticed that there are strange behavior going on if I use > > bcmath functions (some examples you can see here > > https://3v4l.org/D3s7J). I

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] Variadic is_*() functions

2019-02-12 Thread Sara Golemon
On Tue, Feb 12, 2019 at 4:30 AM Côme Chilliet wrote: > My first thought was that this must already exists under another name, > but it seems that none of array_map, array_walk or array_reduce allows to do that easily. > (That is, in a more readable way than the boolean operator string, otherwise i

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

2019-02-12 Thread Christoph M. Becker
On 12.02.2019 at 16:00, 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 is required

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

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

2019-02-12 Thread Nikita Popov
Hi internals, 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 is required to take care of breaking GC cycles man

Re: [PHP-DEV] Re: [Request][Discussion] Double value as array key improvement

2019-02-12 Thread Nikita Popov
On Thu, Aug 31, 2017 at 2:58 AM Andrea Faulds wrote: > Hi there, > > Andrew Nester wrote: > > > > > > Hello internals! > > > > I was working on solution for the problem of double to int conversion > for array indices and would like to create an RFC for proposed solution - > emitting warning when

Re: [PHP-DEV] Variadic is_*() functions

2019-02-12 Thread Côme Chilliet
Le lundi 11 février 2019, 08:59:17 CET Levi Morrison a écrit : > My position is the same: pushing the variadic behavior into the > functions means that each function needs to pick `||` or `&&` > behavior, both of which are useful. I would rather see more > descriptive function names, such as `all_o