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:
Boone Gorges 2015-10-02 13:50:04 +00:00
parent b20695ed9f
commit 19df309491
1 changed files with 2 additions and 1 deletions

View File

@ -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;
}