Make WordPress Core

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


Ignore:
Timestamp:
07/28/2020 07:20:15 AM (5 years ago)
Author:
kirasong
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #50784, comment 6

    initial v1  
    33@desrosj Nice! I wish we could use the method that is 7.1+. Maybe when WordPress starts requiring it.
    44
    5 The `in_array()` pass you wrote is a bit faster in my testing. I think it's easier to read than the first couple approaches, even if not as much as the latter. It doesn't catch *quite* as many files, although I'm guessing not very many are named `.Php`.
     5The `in_array()` pass you wrote is a bit faster in my testing. I think it's easier to read than the `substr_compare()` approaches. It doesn't catch *quite* as many files, although I'm guessing not very many are named `.Php`.
    66
    77Since it seems we all liked [attachment:"50784.substr.diff"] and it lines up with some existing methods in core (thanks, @SergeyBiryukov!), I think it makes sense to go ahead and do that for now.