summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2020-04-01 10:25:22 +0200
committerNikita Popov <nikita.ppv@gmail.com>2020-05-05 16:11:13 +0200
commit5bc1e224dbd660cea99c222baf8bd3c215d25073 (patch)
tree00414aab9d3884198debc4497df632c74b6984a7 /scripts
parent31fb6a08b3a02e665d0e24d2cbd56d13342423c8 (diff)
downloadphp-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-xscripts/dev/bless_tests.php3
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);
}