Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #50784, comment 1


Ignore:
Timestamp:
07/27/2020 12:32:10 PM (4 years ago)
Author:
kirasong
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #50784, comment 1

    initial v1  
    33[attachment:"50784.substr_compare.diff"] is the fastest here, but I noticed that in the [https://www.php.net/manual/en/function.substr-compare.php PHP docs], a warning gets thrown if the string is too short, so [attachment:"50784.substr_compare_warning.diff"] works around that.
    44
    5 Since that comes out pretty terse, I like the approach @jnylen0 used in a previous patch, in [attachment:"50784.substr.diff"] quite a bit. This is slower, but much more readable.
     5Since that comes out pretty terse, I like the approach @jnylen0 used in a previous patch, in [attachment:"50784.substr.diff"] quite a bit. This is slightly slower, but much more readable.
    66
    77Would appreciate any opinions.