Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow array_diff() and array_intersect() with single array argument #6097

Closed
wants to merge 2 commits into from

Conversation

nikic
Copy link
Member

@nikic nikic commented Sep 8, 2020

As discussed with @bwoebi and @Crell recently, we should allow calling array_diff() and friends with only one array argument. This allows usages like array_diff($array, ...$excludes), even if $excludes happens to be empty. We already did similar changes for a couple other array functions like array_merge.

@nikic nikic changed the title Allow array_diff() with single array argument Allow array_diff() and array_intersect() with single array argument Sep 8, 2020
@php-pulls php-pulls closed this in 73ab7b3 Sep 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant