summaryrefslogtreecommitdiff
path: root/tests/lang/bug28800.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lang/bug28800.phpt')
-rw-r--r--tests/lang/bug28800.phpt30
1 files changed, 12 insertions, 18 deletions
diff --git a/tests/lang/bug28800.phpt b/tests/lang/bug28800.phpt
index 2845ca7c88..487c57d24e 100644
--- a/tests/lang/bug28800.phpt
+++ b/tests/lang/bug28800.phpt
@@ -4,24 +4,18 @@ Bug #28800 (Incorrect string to number conversion for strings starting with 'inf
<?php
$strings = array('into', 'info', 'inf', 'infinity', 'infin', 'inflammable');
foreach ($strings as $v) {
- echo ($v+0)."\n";
+ try {
+ echo ($v+0)."\n";
+ } catch (\TypeError $e) {
+ echo $e->getMessage() . \PHP_EOL;
+ }
}
?>
---EXPECTF--
-Warning: A non-numeric value encountered in %s on line %d
-0
+--EXPECT--
+Unsupported operand types: string + int
+Unsupported operand types: string + int
+Unsupported operand types: string + int
+Unsupported operand types: string + int
+Unsupported operand types: string + int
+Unsupported operand types: string + int
-Warning: A non-numeric value encountered in %s on line %d
-0
-
-Warning: A non-numeric value encountered in %s on line %d
-0
-
-Warning: A non-numeric value encountered in %s on line %d
-0
-
-Warning: A non-numeric value encountered in %s on line %d
-0
-
-Warning: A non-numeric value encountered in %s on line %d
-0