summaryrefslogtreecommitdiff
path: root/ext/mbstring/php_mbregex.c
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2020-09-08 15:14:48 +0200
committerNikita Popov <nikita.ppv@gmail.com>2020-09-09 11:03:17 +0200
commit73ab7b30ca52a49fb11b2d61fc757c8eeb7137fd (patch)
tree89669b47aaa31a1260cb77adfea7b15999587446 /ext/mbstring/php_mbregex.c
parent9975986b7ef849c3a8e73a48748befbfdc50e416 (diff)
downloadphp-git-73ab7b30ca52a49fb11b2d61fc757c8eeb7137fd.tar.gz
Allow array_diff() and array_intersect() with single array argument
Both of these functions are well-defined when used with a single array argument -- rejecting this case was an artificial limitation. This is not useful when called with explicit arguments, but removes edge-cases when used with argument unpacking: // OK even if $excludes is empty. array_diff($array, ...$excludes); // OK even if $arrays contains a single array only. array_intersect(...$arrays); This matches the behavior of functions like array_merge() and array_push(), which also allow calls with no array or a single array respectively. Closes GH-6097.
Diffstat (limited to 'ext/mbstring/php_mbregex.c')
0 files changed, 0 insertions, 0 deletions