diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2020-04-01 10:25:22 +0200 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2020-05-05 16:11:13 +0200 |
commit | 5bc1e224dbd660cea99c222baf8bd3c215d25073 (patch) | |
tree | 00414aab9d3884198debc4497df632c74b6984a7 /scripts | |
parent | 31fb6a08b3a02e665d0e24d2cbd56d13342423c8 (diff) | |
download | php-git-5bc1e224dbd660cea99c222baf8bd3c215d25073.tar.gz |
Make numeric operations on resources, arrays and objects type errors
RFC: https://wiki.php.net/rfc/arithmetic_operator_type_checks
Closes GH-5331.
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/dev/bless_tests.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/dev/bless_tests.php b/scripts/dev/bless_tests.php index b772f00cc1..8532e9386d 100755 --- a/scripts/dev/bless_tests.php +++ b/scripts/dev/bless_tests.php @@ -106,7 +106,8 @@ function generateMinimallyDifferingOutput(string $out, string $oldExpect) { function insertOutput(string $phpt, string $out): string { return preg_replace_callback('/--EXPECTF?--.*$/s', function($matches) use($out) { - $F = strpos($out, '%') !== false ? 'F' : ''; + $hasWildcard = preg_match('/%[resSaAwidxfc]/', $out); + $F = $hasWildcard ? 'F' : ''; return "--EXPECT$F--\n" . $out . "\n"; }, $phpt); } |