Make WordPress Core

Timestamp:
11/08/2021 02:21:44 PM (4 years ago)
Author:
hellofromTonya
Message:

General: Introduce polyfills for str_ends_with() and str_starts_with() added in PHP 8.0.

PHP 8.0 introduced two new functions: str_ends_with() and str_starts_with(). These perform a case-sensitive check indicating if the string to search in (haystack) ends or begins with the given substring (needle).

These polyfills make these functios available for use in Core.

Ref:

Props costdev, hellofromTonya, pbearne, pbiron.
Fixes #54377.

File:
1 added

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