[wp-trac] [WordPress Trac] #47746: PHP 7.4 compatibility fix / implode argument order
WordPress Trac
noreply at wordpress.org
Sun Jul 21 06:22:42 UTC 2019
#47746: PHP 7.4 compatibility fix / implode argument order
------------------------------+-----------------------
Reporter: jrf | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 5.3
Component: General | Version: trunk
Severity: normal | Keywords: has-patch
Focuses: coding-standards |
------------------------------+-----------------------
`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
Related:
* https://github.com/rmccue/Requests/pull/346
* https://github.com/simplepie/simplepie/pull/617
Note: `join()` is an alias of `implode()`. It is generally considered best
practice to use the canonical function rather than an alias, however, that
is outside the scope of this ticket.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/47746>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list