Make WordPress Core

Timestamp:
11/08/2021 01:50:35 PM (4 years ago)
Author:
hellofromTonya
Message:

General: Introduce polyfills for array_key_first() and array_key_last() added in PHP 7.3.0.

PHP 7.3.0 introduced two new functions: array_key_first() and array_key_last(). These two functions return the first and last key of each array respectively, without affecting the internal state of the array.

The polyfills make these two functions available for use in Core on PHP versions less than 7.3.0.

Ref:

Props desrosj, pbearne, costdev, hellofromTonya, ayeshrajans, manzoorwanijk, audrasjb, sergeybiryukov.
Fixes #45055.

File:
1 added

Note: See TracChangeset for help on using the changeset viewer.