xref: /PHP-7.3/ext/filter/tests/bug7715.phpt (revision 782352c5)
1--TEST--
2bug 7715, floats value with integer or incomplete input
3--INI--
4precision=14
5--SKIPIF--
6<?php if (!extension_loaded("filter")) die("skip"); ?>
7--FILE--
8<?php
9$data = array(
10	'.23',
11	'-42',
12	'+42',
13	'.4',
14	'-.4',
15	'1000000000000',
16	'-1000000000000',
17	'02.324'
18);
19foreach ($data as $val) {
20	$res = filter_var($val, FILTER_VALIDATE_FLOAT);
21	var_dump($res);
22}
23echo "\n";
24?>
25--EXPECT--
26float(0.23)
27float(-42)
28float(42)
29float(0.4)
30float(-0.4)
31float(1000000000000)
32float(-1000000000000)
33float(2.324)
34