summaryrefslogtreecommitdiff
path: root/tests/lang/bug28800.phpt
blob: 487c57d24e4aae33fa627e7e29a7cdc84ebe6845 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
--TEST--
Bug #28800 (Incorrect string to number conversion for strings starting with 'inf')
--FILE--
<?php
    $strings = array('into', 'info', 'inf', 'infinity', 'infin', 'inflammable');
    foreach ($strings as $v) {
        try {
            echo ($v+0)."\n";
        } catch (\TypeError $e) {
            echo $e->getMessage() . \PHP_EOL;
        }
    }
?>
--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