mirror of
https://github.com/php/php-src.git
synced 2024-10-21 00:12:34 +00:00
![Dmitry Stogov](/assets/img/avatar_default.png)
. fixed integer overflow . fixed buffer overflow/underflow . added more strict IP validation . reimplemented float number validation
30 lines
424 B
PHP
30 lines
424 B
PHP
--TEST--
|
|
filter_data() Float exponential weird result
|
|
--SKIPIF--
|
|
<?php if (!extension_loaded("filter")) die("skip"); ?>
|
|
--FILE--
|
|
<?php
|
|
$data = array(
|
|
'E2',
|
|
'10E',
|
|
'2E-',
|
|
'E-2',
|
|
'+E2'
|
|
);
|
|
$out = filter_var($data, FILTER_VALIDATE_FLOAT, FILTER_REQUIRE_ARRAY);
|
|
var_dump($out);
|
|
?>
|
|
--EXPECTF--
|
|
array(5) {
|
|
[0]=>
|
|
bool(false)
|
|
[1]=>
|
|
bool(false)
|
|
[2]=>
|
|
bool(false)
|
|
[3]=>
|
|
bool(false)
|
|
[4]=>
|
|
bool(false)
|
|
}
|