[wp-trac] [WordPress Trac] #54377: Introduce new PHP cross-version compatibility functions, `str_ends_with()`

WordPress Trac noreply at wordpress.org
Thu Nov 4 22:38:07 UTC 2021


#54377: Introduce new PHP cross-version compatibility functions, `str_ends_with()`
-----------------------------+------------------------------------------
 Reporter:  pbiron           |      Owner:  (none)
     Type:  feature request  |     Status:  new
 Priority:  normal           |  Milestone:  5.9
Component:  General          |    Version:
 Severity:  normal           |   Keywords:  needs-patch needs-unit-tests
  Focuses:                   |
-----------------------------+------------------------------------------
 PHP 8 added a [https://www.php.net/manual/en/function.str-ends-with.php
 str_ends_with()] function.

 It would be good to add a polypill for it to core, so that plugins that
 use it will work on sites running PHP < 8.

 I'll do a patch with unit tests tomorrow.

 Related: #45055, #49652

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/54377>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list