Re: [PHP-DEV] Fix incorrect ternary '?' associativity for 7.0?

2014-12-14 Thread Leon Sorokin
On 12/14/2014 12:51 AM, Levi Morrison wrote: > While I think long-term this would be a beneficial change I think in > the short term it's quite a hurdle. This discussion will be identical whether we wait till PHP7 or PHP9 in a decade. The longer this change takes to make, the more code that wil

Re: [PHP-DEV] Fix incorrect ternary '?' associativity for 7.0?

2014-12-14 Thread George Bond
On 14 December 2014 at 08:24, Leon Sorokin wrote: > > On 12/14/2014 12:51 AM, Levi Morrison wrote: > > > While I think long-term this would be a beneficial change I think in > > the short term it's quite a hurdle. > > This discussion will be identical whether we wait till PHP7 or PHP9 in a > decad

Re: [PHP-DEV] Fix incorrect ternary '?' associativity for 7.0?

2014-12-14 Thread Andrea Faulds
> On 14 Dec 2014, at 12:01, George Bond wrote: > > If you wanted an upgrade path that was not Evil (in the sense of not > introducing subtle and hard-to-diagnose bugs), could you not change the > operator to be *un*associative in PHP7? That would effectively just make > concrete the discouragem

RE: [PHP-DEV] Fix incorrect ternary '?' associativity for 7.0?

2014-12-14 Thread Zeev Suraski
> -Original Message- > From: Andrea Faulds [mailto:a...@ajf.me] > Sent: Sunday, December 14, 2014 2:26 PM > To: George Bond > Cc: PHP internals > Subject: Re: [PHP-DEV] Fix incorrect ternary '?' associativity for 7.0? > > > > On 14 Dec 2014, at 12:01, George Bond > wrote: > > > > If you wa

Re: [PHP-DEV] [VOTE][RFC] Native TLS

2014-12-14 Thread Paul Dragoonis
On Wed, Dec 10, 2014 at 8:46 PM, Dmitry Stogov wrote: > > +1 > > the patch is great. > It doesn't affect non-ZTS build at all. > ZTS build became even a bit faster. :) > > And we finally will able to forget about TSRMLS_ macros :) > Say what? this is music to my ears :) Thanks for the patch.

Re: [PHP-DEV] Fix incorrect ternary '?' associativity for 7.0?

2014-12-14 Thread Leon Sorokin
This sounds like a reasonable compromise to me and infinitely better than doing nothing. However, if 7.0 complains loudly enough about this already quasi-deprecated pattern, then the incubation period for an eventual fix need not be that of a decade-out major version, but of a 7.x point release

[PHP-DEV] [PATCH] Consistent type names in error messages

2014-12-14 Thread Andrea Faulds
Good evening, Unfortunately, zend_parse_parameters and userland type hint error messages use outdated type names, and don’t even do so consistently. For example: $ php -r 'fread(0, 0);' PHP Warning: fread() expects parameter 1 to be resource, integer given in Command line code on line 1 $ php

Re: [PHP-DEV] [PATCH] Consistent type names in error messages

2014-12-14 Thread Kalle Sommer Nielsen
2014-12-14 19:35 GMT+01:00 Andrea Faulds : > Good evening, > > Unfortunately, zend_parse_parameters and userland type hint error messages > use outdated type names, and don’t even do so consistently. For example: > > $ php -r 'fread(0, 0);' > PHP Warning: fread() expects parameter 1 to be resourc

Re: [PHP-DEV] [PATCH] Consistent type names in error messages

2014-12-14 Thread Andrea Faulds
Hi Kalle, > On 14 Dec 2014, at 18:41, Kalle Sommer Nielsen wrote: > > 2014-12-14 19:35 GMT+01:00 Andrea Faulds : >> >> I want to change the type names to be consistent, because I think our >> current inconsistency is confusing. Integers are sometimes ints or integers, >> but other times longs

Re: [PHP-DEV] PHP 7 and json

2014-12-14 Thread Jakub Zelenka
Hi, On Wed, Dec 10, 2014 at 6:43 AM, Remi Collet wrote: > > > The main issue is the "non-free" decoder. > > Agreed. > Of course perf can be considered as an issue (I think minor). > jsonc have bad perf, but is free. > > If jsond have nearly same perf than old one, it's enough. My initial benc

Re: [PHP-DEV] PHP 7 and json

2014-12-14 Thread Kevin Ingwersen (Ingwie Phoenix)
I don’t know if you are interested in some other open source projects that parse JSON, but have you looked at the decoder here? https://github.com/vstakhov/libucl It can parse more than just the JSON format - but it has some JSON benchmarks attached and work

Re: [PHP-DEV] Fix incorrect ternary '?' associativity for 7.0?

2014-12-14 Thread Rowan Collins
On 14 December 2014 17:31:52 GMT, Leon Sorokin wrote: >This sounds like a reasonable compromise to me and infinitely better >than doing nothing. However, if 7.0 complains loudly enough about this >already quasi-deprecated pattern, then the incubation period for an >eventual fix need not be that

Re: [PHP-DEV] PHP 7 and json

2014-12-14 Thread Andrea Faulds
Hi Kevin, > On 14 Dec 2014, at 19:46, Kevin Ingwersen (Ingwie Phoenix) > wrote: > > I don’t know if you are interested in some other open source projects that > parse JSON, but have you looked at the decoder here? > > https://github.com/vstakhov/libucl >

Re: [PHP-DEV] [PATCH] Consistent type names in error messages

2014-12-14 Thread Kalle Sommer Nielsen
2014-12-14 19:44 GMT+01:00 Andrea Faulds : > Hi Kalle, Hi Andrea > Also, a sidenote: In case someone goes and checks the manual and tells me > that is_long() is already an alias of is_int() and not the other way around, > the manual lies. In fact, is_int() is currently an alias of is_long() in

Re: [PHP-DEV] [PATCH] Consistent type names in error messages

2014-12-14 Thread Andrea Faulds
> On 14 Dec 2014, at 19:59, Kalle Sommer Nielsen wrote: > > 2014-12-14 19:44 GMT+01:00 Andrea Faulds : >> Hi Kalle, > > Hi Andrea >> Also, a sidenote: In case someone goes and checks the manual and tells me >> that is_long() is already an alias of is_int() and not the other way around, >> the

Re: [PHP-DEV] Fix incorrect ternary '?' associativity for 7.0?

2014-12-14 Thread Lester Caine
On 14/12/14 19:48, Rowan Collins wrote: > 5.4 is a good example of what we *don't* want to do with minor versions. It > consisted of a messy list of "those bits of the abandoned 6 which didn't > quite make it into 5.3". 5.4 should have been '6' with a 5.4 that provided the very same buffer that

Re: [PHP-DEV] [PATCH] Consistent type names in error messages

2014-12-14 Thread Kalle Sommer Nielsen
Hi Andrea 2014-12-14 21:01 GMT+01:00 Andrea Faulds : > It wouldn’t break anything, I say make a pull request. See: http://news.php.net/php.cvs/83688 http://news.php.net/php.doc.cvs/12965 -- regards, Kalle Sommer Nielsen ka...@php.net -- PHP Internals - PHP Runtime Development Mailing List T

Re: [PHP-DEV] [PATCH] Consistent type names in error messages

2014-12-14 Thread Rowan Collins
On 14/12/2014 18:35, Andrea Faulds wrote: Good evening, Unfortunately, zend_parse_parameters and userland type hint error messages use outdated type names, and don’t even do so consistently. For example: $ php -r 'fread(0, 0);' PHP Warning: fread() expects parameter 1 to be resource, integer

Re: [PHP-DEV] [PATCH] Consistent type names in error messages

2014-12-14 Thread Andrea Faulds
Hey Rowan, > On 14 Dec 2014, at 21:20, Rowan Collins wrote: > > I had a go at this a few months ago, but haven't updated my patch based on > what's changed in the engine since, so it probably wouldn't merge cleanly: > https://github.com/php/php-src/pull/769 Yeah, I was inspired by your effort

Re: [PHP-DEV] Fix incorrect ternary '?' associativity for 7.0?

2014-12-14 Thread Robert Williams
Some thoughts from user land… On the concern of breaking code out there that relies on the current behavior, I strongly suspect far more code would be *fixed* if the ternary operator were changed to match what other languages do. I hate to admit it, but my own shop is a good example. We have a

[PHP-DEV] old RFC vote

2014-12-14 Thread Stanislav Malyshev
Hi! The RFC https://wiki.php.net/rfc/aliases_by_reflection is still in voting status (with 1:7 result so far) - I assume by now we can close the vote and put it into the rejected list? -- Stas Malyshev smalys...@gmail.com -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe,

Re: [PHP-DEV] Fix incorrect ternary '?' associativity for 7.0?

2014-12-14 Thread Leon Sorokin
On 12/14/2014 10:45 PM, Robert Williams wrote: I strongly suspect far more code would be *fixed* if the ternary operator were changed to match what other languages do. I appreciate your support, but either I am not understanding you, or your reasoning is unsound. If you have 'incorrectly'