Fix preg_match_all()
syntax in PCRE benchmark test util.
In versions of PHP earlier than 5.4, the `$matches` parameter was required. Excluding it here meant that PCRE benchmarking tests were erroring on older versions of PHP without cleaning up the PCRE ini settings, causing various problems on later tests. Props miqrogroove, dd32, boonebgorges. And to the cosmic forces that cause bugs like this. The best part of waking up is diagnosing leakage between automated tests. See #34121. git-svn-id: https://develop.svn.wordpress.org/trunk@34772 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
b20695ed9f
commit
19df309491
@ -419,7 +419,8 @@ function benchmark_pcre_backtracking( $pattern, $subject, $strategy ) {
|
||||
preg_match( $pattern, $subject );
|
||||
break;
|
||||
case 'match_all':
|
||||
preg_match_all( $pattern, $subject );
|
||||
$matches = array();
|
||||
preg_match_all( $pattern, $subject, $matches );
|
||||
break;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user