[wp-trac] [WordPress Trac] #58206: Replace usage of strpos with str_contains

WordPress Trac noreply at wordpress.org
Thu Apr 27 10:27:28 UTC 2023


#58206: Replace usage of strpos with str_contains
-------------------------------------------+-----------------------------
 Reporter:  spacedmonkey                   |      Owner:  (none)
     Type:  enhancement                    |     Status:  new
 Priority:  normal                         |  Milestone:  Awaiting Review
Component:  General                        |    Version:
 Severity:  normal                         |   Keywords:  good-first-bug
  Focuses:  performance, coding-standards  |
-------------------------------------------+-----------------------------
 Replace usage of false === strpos or false !== strpos with
 str_starts_with. It makes the code more readable and use a PHP native
 function ( which may have a performance benefit ).

 Follow on from #58012

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


More information about the wp-trac mailing list