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.