[wp-trac] [WordPress Trac] #49652: Introduce new PHP cross-version compatibility functions, `str_contains()`
WordPress Trac
noreply at wordpress.org
Mon Nov 8 14:03:09 UTC 2021
#49652: Introduce new PHP cross-version compatibility functions, `str_contains()`
---------------------------------------------+-----------------------------
Reporter: knutsp | Owner: hellofromTonya
Type: feature request | Status: closed
Priority: normal | Milestone: 5.9
Component: General | Version: 5.3.2
Severity: minor | Resolution: fixed
Keywords: has-patch has-unit-tests commit | Focuses:
---------------------------------------------+-----------------------------
Changes (by hellofromTonya):
* status: accepted => closed
* resolution: => fixed
Comment:
In [changeset:"52039" 52039]:
{{{
#!CommitTicketReference repository="" revision="52039"
General: Introduce polyfill for `str_contains()` added in PHP 8.0.
PHP 8.0 introduced a new function: `str_contains()`. It performs a case-
sensitive check indicating if given substring (needle) is contained in the
string to search in (haystack).
This polyfill makes this function available for use in Core.
Ref:
* PHP RFC https://wiki.php.net/rfc/str_contains
* PHP manual https://www.php.net/manual/en/function.str-contains.php
Props ayeshrajans, costdev, desrosj, hellofromTonya, knutsp, pbearne.
Fixes #49652.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/49652#comment:13>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list