mirror of
git://develop.git.wordpress.org/
synced 2025-04-02 19:22:34 +02:00
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: * PHP RFC https://wiki.php.net/rfc/add_str_starts_with_and_ends_with_functions * PHP manual `str_ends_with()` https://www.php.net/manual/en/function.str-ends-with.php * PHP manual `str_starts_with()` https://www.php.net/manual/en/function.str-starts-with.php Props costdev, hellofromTonya, pbearne, pbiron. Fixes #54377. git-svn-id: https://develop.svn.wordpress.org/trunk@52040 602fd350-edb4-49c9-b593-d223f7449a82