[PHP-DEV] Re: [RFC][Vote] Covariant Returns and Contravariant Parameters

2019-01-15 Thread Christoph M. Becker
On 04.01.2019 at 20:17, Levi Morrison wrote: > I intend to close the vote in a day or two, unless I hear of new> issues from > Dmitry or others. Any news here? -- Christoph M. Becker -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV][RFC] mb_str_split

2019-01-15 Thread Lauri Kenttä
On 2019-01-13 17:29, Legale Legage wrote: There is 2 more 2-bytes width encodings: MBFL_ENCTYPE_MWC2BE (UTF16-BE), MBFL_ENCTYPE_MWC2LE (UTF16-LE). UTF-16 is not a fixed-width 2-byte encoding. Just like UTF-8 is not a fixed-width 1-byte encoding. -- Lauri Kenttä -- PHP Internals - PHP Runtime

Re: [PHP-DEV] Suggested libgd ABI change leading to ext/gd BC break

2019-01-15 Thread Zeev Suraski
Sent from my mobile On 15 Jan 2019, at 15:29, Christoph M. Becker mailto:cmbecke...@gmx.de>> wrote: On 15.01.2019 at 13:32, Zeev Suraski wrote: On 15 Jan 2019, at 13:13, Christoph M. Becker mailto:cmbecke...@gmx.de>> wrote: Most recently, a pull request has been submitted for libgd[1], whic

Re: [PHP-DEV] Suggested libgd ABI change leading to ext/gd BC break

2019-01-15 Thread Christoph M. Becker
On 15.01.2019 at 13:32, Zeev Suraski wrote: >> On 15 Jan 2019, at 13:13, Christoph M. Becker wrote: >> >> Most recently, a pull request has been submitted for libgd[1], which >> suggests to define image IO functions for several image formats >> unconditionally; if the format is not supported, the

Re: [PHP-DEV] [RFC] Reflection for references

2019-01-15 Thread Nikita Popov
On Tue, Jan 15, 2019 at 1:09 PM Nicolas Grekas wrote: > About using "int" as return type for getId(): > > > * Can the `getId()` return type be restricted to either `int` or >> > `string`? Why is it a union type right now? Technical limitation? >> >> To allow changes in the future. The real retur

Re: [PHP-DEV] Suggested libgd ABI change leading to ext/gd BC break

2019-01-15 Thread Zeev Suraski
> On 15 Jan 2019, at 13:13, Christoph M. Becker wrote: > > Hi! > > Most recently, a pull request has been submitted for libgd[1], which > suggests to define image IO functions for several image formats > unconditionally; if the format is not supported, the IO functions would > fail with an er

Re: [PHP-DEV] [RFC] Reflection for references

2019-01-15 Thread Nicolas Grekas
About using "int" as return type for getId(): > * Can the `getId()` return type be restricted to either `int` or > > `string`? Why is it a union type right now? Technical limitation? > > To allow changes in the future. The real return value here is an int, but > the size increase due to hashing m

[PHP-DEV] Suggested libgd ABI change leading to ext/gd BC break

2019-01-15 Thread Christoph M. Becker
Hi! Most recently, a pull request has been submitted for libgd[1], which suggests to define image IO functions for several image formats unconditionally; if the format is not supported, the IO functions would fail with an error notice. This would break the current ext/gd configuration, since it r

Re: [PHP-DEV] [RFC] Reflection for references

2019-01-15 Thread Marco Pivetta
On Tue, Jan 15, 2019 at 11:57 AM Nikita Popov wrote: > > * instead of `$ref1->getId() === $ref2->getId()`, `$ref1->matches($ref2)` >> or such. >> > * what are possible scenarios for getting the identifier as a primitive, >> and then storing it somewhere (like an array of reference identifiers)?

Re: [PHP-DEV] [RFC] Reflection for references

2019-01-15 Thread Nikita Popov
On Tue, Jan 15, 2019 at 11:30 AM Marco Pivetta wrote: > A few issues with the RFC so far: > > * `ReflectionReference` seems to be designed around arrays only: maybe > `ReflectionArrayKeyReference` or such? > ReflectionReference works with arbitrary references. Arrays only come in as a detail of

Re: [PHP-DEV] [RFC] Reflection for references

2019-01-15 Thread Nicolas Grekas
Thank you Nikita, I will definitely need that RFC! Answering to Marco: * `ReflectionReference` seems to be designed around arrays only: maybe > `ReflectionArrayKeyReference` or such? > I agree with the wording in the RFC: the array is the primitive data structure in PHP that holds references.

Re: [PHP-DEV] [RFC] Reflection for references

2019-01-15 Thread Marco Pivetta
A few issues with the RFC so far: * `ReflectionReference` seems to be designed around arrays only: maybe `ReflectionArrayKeyReference` or such? * Can the `getId()` return type be restricted to either `int` or `string`? Why is it a union type right now? Technical limitation? * `ReflectionReferen

[PHP-DEV] [RFC] Reflection for references

2019-01-15 Thread Nikita Popov
Hi internals, I'd like to propose the addition of a ReflectionReference class, as described in the following RFC: https://wiki.php.net/rfc/reference_reflection This topic was previously discussed at https://externals.io/message/102638. The TL;DR is that some libraries need a way to detect referen