xref: /PHP-7.4/tests/lang/bug28800.phpt (revision d679f022)
1--TEST--
2Bug #28800 (Incorrect string to number conversion for strings starting with 'inf')
3--FILE--
4<?php
5	$strings = array('into', 'info', 'inf', 'infinity', 'infin', 'inflammable');
6	foreach ($strings as $v) {
7		echo ($v+0)."\n";
8	}
9?>
10--EXPECTF--
11Warning: A non-numeric value encountered in %s on line %d
120
13
14Warning: A non-numeric value encountered in %s on line %d
150
16
17Warning: A non-numeric value encountered in %s on line %d
180
19
20Warning: A non-numeric value encountered in %s on line %d
210
22
23Warning: A non-numeric value encountered in %s on line %d
240
25
26Warning: A non-numeric value encountered in %s on line %d
270
28