mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2025-10-16 12:05:38 +00:00
A number of assertions are checking for the number of times a hard-coded substring existed in a larger `$haystack`. These assertions were using `preg_match_all()` to do so, but without actually using a regex. In these cases, it is more performant (and simpler) to use the PHP native `substr_count()` function, which will yield the same result, without the overhead of regex parsing. Reference: [https://www.php.net/manual/en/function.substr-count.php PHP Manual: substr_count()] Follow-up to [711/tests], [38838], [42694], [53558]. Props jrf. See #55652. git-svn-id: https://develop.svn.wordpress.org/trunk@53790 602fd350-edb4-49c9-b593-d223f7449a82 |
||
|---|---|---|
| .. | ||
| e2e | ||
| gutenberg | ||
| phpunit | ||
| qunit | ||
| visual-regression | ||