mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Make %a/%A placeholders in tests lazy (#16088)
This reduces backtracking, which should improve performance and avoid hitting the backtrack limit in tests with a large output. See https://github.com/php/php-src/pull/16087
This commit is contained in:
@@ -2872,8 +2872,8 @@ function expectf_to_regex(?string $wanted): string
|
||||
'%e' => preg_quote(DIRECTORY_SEPARATOR, '/'),
|
||||
'%s' => '[^\r\n]+',
|
||||
'%S' => '[^\r\n]*',
|
||||
'%a' => '.+',
|
||||
'%A' => '.*',
|
||||
'%a' => '.+?',
|
||||
'%A' => '.*?',
|
||||
'%w' => '\s*',
|
||||
'%i' => '[+-]?\d+',
|
||||
'%d' => '\d+',
|
||||
|
||||
Reference in New Issue
Block a user