Skip to content

Conversation

@jrfnl
Copy link
Contributor

@jrfnl jrfnl commented Jul 21, 2019

implode() takes two parameters, $glue and $pieces.
For historical reasons, implode() accepted these parameters in either order, though it was recommended to use the documented argument order of implode( $glue, $pieces ).

PHP 7.4 is slated to deprecate the tolerance for passing the parameters for implode() in reverse order.
PHP 8.0 is expected to remove the tolerance for this completely.

Refs:

These instances were discovered while testing a new PHPCompatibility sniff to detect this issue.

`implode()` takes two parameters, `$glue` and `$pieces`.
For historical reasons, `implode()` accepted these parameters in either order, though it was recommended to use the documented argument order of `implode( $glue, $pieces )`.

PHP 7.4 is slated to deprecate the tolerance for passing the parameters for `implode()` in reverse order.
PHP 8.0 is expected to remove the tolerance for this completely.

Refs:
* https://wiki.php.net/rfc/deprecations_php_7_4#implode_parameter_order_mix
* https://php.net/manual/en/function.implode.php

These instances were discovered while testing a new PHPCompatibility sniff to detect this issue.
@gsherwood gsherwood added this to the 3.5.0 milestone Jul 21, 2019
@gsherwood gsherwood merged commit bcadfc1 into squizlabs:master Jul 24, 2019
gsherwood added a commit that referenced this pull request Jul 24, 2019
@gsherwood
Copy link
Member

Thanks a lot for fixing these.

@jrfnl jrfnl deleted the feature/php-7.4-compatibility branch July 24, 2019 09:30
@jrfnl
Copy link
Contributor Author

jrfnl commented Jul 24, 2019

You're welcome ;-)

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants