Re: [PHP-DEV] [RFC][Under Discussion] Add functions array_key_first()and array_key_last()

2018-07-04 Thread Enno Woortmann
Am 28.06.2018 um 16:52 schrieb Levi Morrison: I think there has been a lack of discussion about why this is desired. For me, it's always been implementing certain kinds of iterators that wrap arrays. This means that functions which return both the key and value are optimal for me. As I already

Re: [PHP-DEV] json_encode() x-notation

2018-07-04 Thread Nikita Popov
On Fri, Jun 29, 2018 at 8:51 PM, David Rodrigues wrote: > ​Hello. I saw that JS supports the x-notation (\x40) and u-notation > (\u0040), but PHP only supports u-notation. There some reason for that? > > JSON.parse('"\x40"'); // => @ > JSON.parse('"\u0040"'); // => @ > No it doesn't.

[PHP-DEV] Re: [PATCH] Make var_export() output "(object)array(..." instead of"stdClass::__set_state(..." for stdClass

2018-07-04 Thread Christoph M. Becker
On 14.03.2017 at 19:57, Andrea Faulds wrote: > Since stdClass has no __set_state method, var_export() produces unusable > output if given an object of that class. I wrote a patch that would make > var_export() produce a cast to object instead, which could be evaluated > to get back a stdClass: >

Re: [PHP-DEV] Re: [RFC] Deprecations for PHP 7.3

2018-07-04 Thread Nikita Popov
On Wed, Jul 4, 2018 at 7:32 PM, Stanislav Malyshev wrote: > Hi! > > >> Procedural question: Would you prefer that the vote for this (and the > other > >> two deprecation RFCs) is one week (the minimum voting period), or that > the > >> vote is two weeks but the deprecations land for beta 2

Re: [PHP-DEV] [RFC] Deprecate and remove continue targeting switch

2018-07-04 Thread Yasuo Ohgaki
On Mon, Jun 25, 2018 at 1:17 AM Nikita Popov wrote: > Hi internals, > > Another small deprecation for your consideration... > > https://wiki.php.net/rfc/continue_on_switch_deprecation > > Regards, > Nikita > This great improvement. IMO. Since the issue is incompatibility between current

Re: [PHP-DEV] [RFC] Deprecate and remove continue targeting switch

2018-07-04 Thread Kalle Sommer Nielsen
Den tor. 5. jul. 2018 kl. 00.15 skrev Yasuo Ohgaki : > Since the issue is incompatibility between current "continue" and "break", > how about provide a tool replace "continue" to "break" where it is > applicable. > (Raise error for invalid "continue" usage also. This would be a bug most > likely.)

Re: [PHP-DEV] json_encode() x-notation

2018-07-04 Thread David Rodrigues
Em qua, 4 de jul de 2018 19:01, Nikita Popov escreveu: > On Fri, Jun 29, 2018 at 8:51 PM, David Rodrigues > wrote: > >> ​Hello. I saw that JS supports the x-notation (\x40) and u-notation >> (\u0040), but PHP only supports u-notation. There some reason for that? >> >> JSON.parse('"\x40"'); //

[PHP-DEV] Re: json_encode() x-notation

2018-07-04 Thread Andrea Faulds
Hi David, David Rodrigues wrote: ​Hello. I saw that JS supports the x-notation (\x40) and u-notation (\u0040), but PHP only supports u-notation. There some reason for that? JSON.parse('"\x40"'); // => @ JSON.parse('"\u0040"'); // => @ While PHP: json_decode('"\\u0040"'); // => @

Re: [PHP-DEV] [RFC] Deprecate and remove continue targeting switch

2018-07-04 Thread Christoph M. Becker
On 05.07.2018 at 00:20, Kalle Sommer Nielsen wrote: > Den tor. 5. jul. 2018 kl. 00.15 skrev Yasuo Ohgaki : > >> Since the issue is incompatibility between current "continue" and "break", >> how about provide a tool replace "continue" to "break" where it is >> applicable. >> (Raise error for

[PHP-DEV] Re: json_encode() x-notation

2018-07-04 Thread Andrea Faulds
Hi, Andrea Faulds wrote: Hi David, David Rodrigues wrote: ​Hello. I saw that JS supports the x-notation (\x40) and u-notation (\u0040), but PHP only supports u-notation. There some reason for that? JSON.parse('"\x40"'); // => @ JSON.parse('"\u0040"'); // => @ While PHP:

Re: [PHP-DEV] Re: PHP 7.3 zif_handler changes

2018-07-04 Thread Nikita Popov
On Wed, Jul 4, 2018 at 11:32 AM, Christoph M. Becker wrote: > On 04.07.2018 at 01:16, Jan Ehrhardt wrote: > > > Another one: some extensioms suffer from the fact that the macro GC_G > > was removed from > > https://github.com/php/php-src/blob/master/Zend/zend_gc.h > > Some of the removed

Re: [PHP-DEV] Re: PHP 7.3 zif_handler changes

2018-07-04 Thread Christoph M. Becker
On 04.07.2018 at 11:32, Christoph M. Becker wrote: >> Are the changes to zend_gc.h documneted? > > Apparently not. […] Fixed with . -- Christoph M. Becker -- PHP Internals - PHP Runtime Development

Re: [PHP-DEV] Re: PHP 7.3 zif_handler changes

2018-07-04 Thread Christoph M. Becker
On 04.07.2018 at 01:16, Jan Ehrhardt wrote: > Another one: some extensioms suffer from the fact that the macro GC_G > was removed from > https://github.com/php/php-src/blob/master/Zend/zend_gc.h > Some of the removed functionality has been reintroduced in gc_status >

Re: [PHP-DEV] Re: PHP 7.3 zif_handler changes

2018-07-04 Thread Christoph M. Becker
On 04.07.2018 at 12:24, Nikita Popov wrote: > On Wed, Jul 4, 2018 at 11:32 AM, Christoph M. Becker > wrote: > >> On 04.07.2018 at 01:16, Jan Ehrhardt wrote: >> >>> Another one: some extensioms suffer from the fact that the macro GC_G >>> was removed from >>>

[PHP-DEV] Re: [RFC] Deprecations for PHP 7.3

2018-07-04 Thread Christoph M. Becker
On 04.07.2018 at 16:07, Nikita Popov wrote: > On Sun, Jun 24, 2018 at 10:29 PM, Christoph M. Becker > wrote: > >> On 24.06.2018 at 18:47, Nikita Popov wrote: >> >>> This RFC collects a number of deprecations for PHP 7.3 which I consider >> to >>> be too minor to warrant a separate proposal.

Re: [PHP-DEV] [RFC] Deprecate and remove continue targeting switch

2018-07-04 Thread Christoph M. Becker
On 04.07.2018 at 16:51, Zeev Suraski wrote: > On Wed, Jul 4, 2018 at 5:15 PM Nikita Popov wrote: > >> On Wed, Jun 27, 2018 at 11:07 PM, Stanislav Malyshev >> wrote: >> In the proposal, the code is valid in all versions of PHP up to and including 7.3, *and represents the same

Re: [PHP-DEV] [RFC] Deprecate and remove continue targeting switch

2018-07-04 Thread Nikita Popov
On Wed, Jun 27, 2018 at 11:07 PM, Stanislav Malyshev wrote: > Hi! > > > In the proposal, the code is valid in all versions of PHP up to and > > including 7.3, *and represents the same algorithm in all versions*. The > > only difference would be the side-effect of issuing an additional > >

Re: [PHP-DEV] [RFC] Deprecate and remove continue targeting switch

2018-07-04 Thread Zeev Suraski
On Wed, Jul 4, 2018 at 5:15 PM Nikita Popov wrote: > On Wed, Jun 27, 2018 at 11:07 PM, Stanislav Malyshev > wrote: > > > Hi! > > > > > In the proposal, the code is valid in all versions of PHP up to and > > > including 7.3, *and represents the same algorithm in all versions*. The > > > only

Re: [PHP-DEV] [RFC] Deprecate and remove case-insensitive constants

2018-07-04 Thread Nikita Popov
On Mon, Jun 25, 2018 at 8:03 AM, Stanislav Malyshev wrote: > Hi! > > > https://wiki.php.net/rfc/case_insensitive_constant_deprecation > > > > This was already discussed some time ago on the list, though that > > discussion degenerated into unfortunate directions. I'd very much > > appreciate if

Re: [PHP-DEV] [RFC] Deprecate and remove case-insensitive constants

2018-07-04 Thread Zeev Suraski
On Wed, Jul 4, 2018 at 5:12 PM Nikita Popov wrote: > On Mon, Jun 25, 2018 at 8:03 AM, Stanislav Malyshev > wrote: > > > Are there any other opinions on this topic or the RFC in general? I'm a bit > surprised that there are so little comments after the somewhat explosive > discussion last time

[PHP-DEV] Re: [RFC] Deprecations for PHP 7.3

2018-07-04 Thread Nikita Popov
On Sun, Jun 24, 2018 at 10:29 PM, Christoph M. Becker wrote: > On 24.06.2018 at 18:47, Nikita Popov wrote: > > > This RFC collects a number of deprecations for PHP 7.3 which I consider > to > > be too minor to warrant a separate proposal. However, each deprecation > will > > still be voted

Re: [PHP-DEV] [RFC] Deprecate and remove case-insensitive constants

2018-07-04 Thread Christoph M. Becker
On 04.07.2018 at 17:02, Zeev Suraski wrote: > On Wed, Jul 4, 2018 at 5:12 PM Nikita Popov wrote: > >> On Mon, Jun 25, 2018 at 8:03 AM, Stanislav Malyshev >> wrote: >> >> Are there any other opinions on this topic or the RFC in general? I'm a bit >> surprised that there are so little comments

Re: [PHP-DEV] [RFC] Deprecate and remove continue targeting switch

2018-07-04 Thread Nikita Popov
On Wed, Jul 4, 2018 at 5:28 PM, Christoph M. Becker wrote: > On 04.07.2018 at 16:51, Zeev Suraski wrote: > > > On Wed, Jul 4, 2018 at 5:15 PM Nikita Popov > wrote: > > > >> On Wed, Jun 27, 2018 at 11:07 PM, Stanislav Malyshev < > smalys...@gmail.com> > >> wrote: > >> > In the proposal, the

RE: [PHP-DEV] [RFC] Deprecate and remove case-insensitive constants

2018-07-04 Thread Zeev Suraski
> -Original Message- > From: Christoph M. Becker [mailto:cmbecke...@gmx.de] > Sent: Wednesday, July 4, 2018 8:00 PM > To: Zeev Suraski ; Nikita Popov > Cc: Stanislav Malyshev ; Internals > > Subject: Re: [PHP-DEV] [RFC] Deprecate and remove case-insensitive constants > > On 04.07.2018

Re: [PHP-DEV] Re: [RFC] Deprecations for PHP 7.3

2018-07-04 Thread Stanislav Malyshev
Hi! >> Procedural question: Would you prefer that the vote for this (and the other >> two deprecation RFCs) is one week (the minimum voting period), or that the >> vote is two weeks but the deprecations land for beta 2 rather than beta 1? > > Hmm, it's probably best to ship the deprecations (if

Re: [PHP-DEV] [RFC] Deprecate and remove case-insensitive constants

2018-07-04 Thread Stanislav Malyshev
Hi! > So basically the practical BC impact of making them reserved keywords > would only be a) cannot be used via constant() anymore and b) can't > declare global functions with these names. I think b) is completely fine (I don't think anybody needs a function named "true" - would be very

Re: [PHP-DEV] [RFC] Deprecate and remove continue targeting switch

2018-07-04 Thread Stanislav Malyshev
Hi! > Should I just go ahead and implement the warning (with no intent of > future removal), or do we want to still go through the RFC here? I think it's ok to just add the warning, unless somebody objects. -- Stas Malyshev smalys...@gmail.com -- PHP Internals - PHP Runtime Development

[PHP-DEV] Re: [RFC] Deprecate and remove case-insensitive constants

2018-07-04 Thread Nikita Popov
On Sun, Jun 24, 2018 at 1:18 PM, Nikita Popov wrote: > Hi internals, > > I'd like to propose the deprecation (in PHP 7.3) and removal (in PHP 8) of > case-insensitive constants: > > https://wiki.php.net/rfc/case_insensitive_constant_deprecation > > This was already discussed some time ago on the