diff options
Diffstat (limited to 'ext/filter/tests/044.phpt')
-rw-r--r-- | ext/filter/tests/044.phpt | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/ext/filter/tests/044.phpt b/ext/filter/tests/044.phpt new file mode 100644 index 0000000..ff46893 --- /dev/null +++ b/ext/filter/tests/044.phpt @@ -0,0 +1,25 @@ +--TEST-- +Integer validation with spaces +--SKIPIF-- +<?php if (!extension_loaded("filter")) die("skip"); ?> +--INI-- +precision=14 +--FILE-- +<?php +$vals = array( +" + ", +" ", +" 123", +" 123.01 ", +); + +foreach ($vals as $var) { + var_dump(filter_var($var, FILTER_VALIDATE_FLOAT)); +} +?> +--EXPECT-- +bool(false) +bool(false) +float(123) +float(123.01) |