From 5bc1e224dbd660cea99c222baf8bd3c215d25073 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 1 Apr 2020 10:25:22 +0200 Subject: Make numeric operations on resources, arrays and objects type errors RFC: https://wiki.php.net/rfc/arithmetic_operator_type_checks Closes GH-5331. --- scripts/dev/bless_tests.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'scripts') 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); } -- cgit v1.2.1