PHP 7.4: RequiredToOptionalFunctionParameters: account for new optional array_merge() parameters by jrfnl · Pull Request #817 · PHPCompatibility/PHPCompatibility

Skip to content

Navigation Menu

Sign in

Appearance settings

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Conversation

@jrfnl

Copy link Copy Markdown

Member

@jrfnl jrfnl commented

Jun 14, 2019

array_merge() and array_merge_recursive() may now be called without any
arguments, in which case they will return an empty array. This is useful
in conjunction with the spread operator, e.g. array_merge(...$arrays).

Refs:

Loosely related to #808

…al array_merge() parameters

> array_merge() and array_merge_recursive() may now be called without any
> arguments, in which case they will return an empty array. This is useful
> in conjunction with the spread operator, e.g. array_merge(...$arrays).

Refs:
* https://github.com/php/php-src/blob/42cc58ff7b2fee1c17a00dc77a4873552ffb577f/UPGRADING#L276
* https://www.php.net/manual/en/function.array-merge.php
* https://www.php.net/manual/en/function.array-merge-recursive.php
* php/php-src#4175
* php/php-src@77cf3d7

@jrfnl jrfnl added Type: enhancement PR: quick merge

PR only contains relatively simple changes

PR: ready for review labels

Jun 14, 2019

@jrfnl jrfnl added this to the 9.2.0 milestone

Jun 14, 2019

@jrfnl jrfnl requested a review from wimg

June 14, 2019 12:19

@wimg wimg merged commit 60b98f6 into master

Jun 16, 2019

@wimg wimg deleted the php-7.4/required-optional-args-array-merge branch

June 16, 2019 13:21

@jrfnl jrfnl removed the PR: quick merge

PR only contains relatively simple changes

label

Sep 5, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@wimg wimg wimg approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

9.2.0

Development

Successfully merging this pull request may close these issues.

2 participants

@jrfnl @wimg