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 <cmbecke...@gmx.de> wrote: > On 26.08.2016 at 16:48, Levi Morrison wrote: > > > On Fri, Aug 26, 2016 at 4:53 AM, Christoph M. Becker <cmbecke...@gmx.de> > 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() with "aa+" instead of "+" in > >> the first place? Maybe I'm missing something, but otherwise I would > >> suggest to fix that altogether instead of piecemeal, even if that has to > >> wait until 8.0. > > > > Well, its behavior does differ with a single array: it will preserve > > keys in this case. If more than one array is passed it will > > numerically index the keys starting at zero. This is the only reason I > > can think of. > > Indeed, I've overlooked that array_diff() accepts a single array. So, > ZPP could use "aa*". My point is that it's better to rely on common > checks (and respective errors), than to have individual checks for each > (group of) function(s). If that had already been the case, we wouldn't > need to have this discussion. :-) > > -- > Christoph M. Becker >