wordpress-develop/tests/phpunit/tests/compat
Tonya Mork 1046682e4f 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:
* 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
2021-11-08 14:21:44 +00:00
..
arrayKeyFirst.php General: Introduce polyfills for array_key_first() and array_key_last() added in PHP 7.3.0. 2021-11-08 13:50:35 +00:00
arrayKeyLast.php General: Introduce polyfills for array_key_first() and array_key_last() added in PHP 7.3.0. 2021-11-08 13:50:35 +00:00
hashHmac.php Build/Test Tools: Splits and improves compat tests. 2021-09-22 23:05:59 +00:00
isCountable.php Build/Test Tools: Splits and improves compat tests. 2021-09-22 23:05:59 +00:00
isIterable.php Build/Test Tools: Splits and improves compat tests. 2021-09-22 23:05:59 +00:00
jsonEncodeDecode.php Tests: Update the Services_JSON test for PHPUnit 9.5.10/8.5.21+. 2021-09-26 03:27:10 +00:00
mbStrlen.php Build/Test Tools: Splits and improves compat tests. 2021-09-22 23:05:59 +00:00
mbSubstr.php Build/Test Tools: Splits and improves compat tests. 2021-09-22 23:05:59 +00:00
strContains.php General: Introduce polyfill for str_contains() added in PHP 8.0. 2021-11-08 14:02:54 +00:00
strEndsWith.php General: Introduce polyfills for str_ends_with() and str_starts_with() added in PHP 8.0. 2021-11-08 14:21:44 +00:00
strStartsWith.php General: Introduce polyfills for str_ends_with() and str_starts_with() added in PHP 8.0. 2021-11-08 14:21:44 +00:00