Re: [PHP-DEV] Reverting "Too Few Arguments Exception" RFC

2016-08-27 Thread Davey Shafik
FTR, I've created a second PR, without the changes to the array functions: https://github.com/php/php-src/pull/2100 This way we can go either way. - Davey On Sat, Aug 27, 2016 at 1:57 AM, Christoph M. Becker wrote: > On 26.08.2016 at 16:48, Levi Morrison wrote: > > > On Fri, Aug 26, 2016 at 4

Re: [PHP-DEV] Reverting "Too Few Arguments Exception" RFC

2016-08-26 Thread Christoph M. Becker
On 26.08.2016 at 16:48, Levi Morrison wrote: > On Fri, Aug 26, 2016 at 4:53 AM, Christoph M. Becker > wrote: > >> Finally, I wonder why array_diff(), for instance, even has an explicit >> check for ZEND_NUM_ARGS() and for Z_TYPE() != IS_ARRAY instead of >> properly invoking zend_parse_parameters

Re: [PHP-DEV] Reverting "Too Few Arguments Exception" RFC

2016-08-26 Thread Levi Morrison
On Fri, Aug 26, 2016 at 4:53 AM, Christoph M. Becker wrote: > On 25.08.2016 at 18:37, Davey Shafik wrote: > >> On Thu, Aug 25, 2016 at 8:12 PM, Christoph M. Becker >> wrote: >> >>> Indeed, the RFC explicitly claims: >>> >>> | Behavior of internal functions is not going to be changed. >> >> This i

Re: [PHP-DEV] Reverting "Too Few Arguments Exception" RFC

2016-08-26 Thread Christoph M. Becker
On 25.08.2016 at 18:37, Davey Shafik wrote: > On Thu, Aug 25, 2016 at 8:12 PM, Christoph M. Becker > wrote: > >> Indeed, the RFC explicitly claims: >> >> | Behavior of internal functions is not going to be changed. > > This is correct for functions that had the correct behavior before > (everyt

Re: [PHP-DEV] Reverting "Too Few Arguments Exception" RFC

2016-08-25 Thread Davey Shafik
On Thu, Aug 25, 2016 at 8:12 PM, Christoph M. Becker wrote: > On 24.08.2016 at 18:45, Nikita Popov wrote: > > > On Aug 24, 2016 9:55 AM, "Davey Shafik" wrote: > >> > >> Given this thread: http://externals.io/thread/233 > >> > >> I'm not happy with the state of this going into RC1 next week, and

Re: [PHP-DEV] Reverting "Too Few Arguments Exception" RFC

2016-08-25 Thread Christoph M. Becker
On 24.08.2016 at 18:45, Nikita Popov wrote: > On Aug 24, 2016 9:55 AM, "Davey Shafik" wrote: >> >> Given this thread: http://externals.io/thread/233 >> >> I'm not happy with the state of this going into RC1 next week, and without >> changes (such as the patch I provided), I would like to revert t

Re: [PHP-DEV] Reverting "Too Few Arguments Exception" RFC

2016-08-24 Thread Davey Shafik
Nikita, It is _always_ better to have more specific exceptions when it makes sense. In this case, we need to do it to maintain BC. One use-case that wasn't covered in the RFC, is the use of argument unpacking with too few elements in the array/traversable — whereby you would want to guard specifi

Re: [PHP-DEV] Reverting "Too Few Arguments Exception" RFC

2016-08-24 Thread Nikita Popov
On Aug 24, 2016 9:55 AM, "Davey Shafik" wrote: > > Hi all, > > Given this thread: http://externals.io/thread/233 > > I'm not happy with the state of this going into RC1 next week, and without > changes (such as the patch I provided), I would like to revert this change > and leave it for 7.2. > > M

[PHP-DEV] Reverting "Too Few Arguments Exception" RFC

2016-08-24 Thread Davey Shafik
Hi all, Given this thread: http://externals.io/thread/233 I'm not happy with the state of this going into RC1 next week, and without changes (such as the patch I provided), I would like to revert this change and leave it for 7.2. My patch will _retain_ BC for internal functions with non strict_t