Make WordPress Core

Changes between Version 1 and Version 2 of Ticket #58206, comment 12


Ignore:
Timestamp:
05/02/2023 07:58:45 PM (22 months ago)
Author:
azaozz
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #58206, comment 12

    v1 v2  
    11I have "mixed feelings" about this. Imho replacing `false === strpos( ... )` and `false !== strpos( ... )` with `str_contains()` is premature.
    22
    3 The problem is that only ~20% of the current WP sites are on PHP 8+. So 80% will have to use the polyfill. Then the question is: how much slower is the polyfill compared to the native PHP 7.4 code? I did a quick comparison and it seems about 280% slower:
     3The problem is that only ~20% of the current WP sites are on PHP 8+. So 80% will have to use the polyfill. Then the question is: how much slower is the polyfill compared to the native PHP 7.4 code? I did a quick comparison and it seems about 300% slower:
    44
    55{{{