mirror of
https://github.com/php/php-src.git
synced 2024-12-12 03:15:29 +08:00
Add more tests for the new +0/-0 behaviour.
This commit is contained in:
parent
3990641e62
commit
dcd99c4b19
@ -15,6 +15,8 @@ $data = "+0"; var_dump(filter_var($data, FILTER_VALIDATE_INT));
|
||||
$data = "123"; var_dump(filter_var($data, FILTER_VALIDATE_INT));
|
||||
$data = -123; var_dump(filter_var($data, FILTER_VALIDATE_INT));
|
||||
$data = 0; var_dump(filter_var($data, FILTER_VALIDATE_INT));
|
||||
$data = -0; var_dump(filter_var($data, FILTER_VALIDATE_INT));
|
||||
$data = +0; var_dump(filter_var($data, FILTER_VALIDATE_INT));
|
||||
$data = 123; var_dump(filter_var($data, FILTER_VALIDATE_INT));
|
||||
$data = ""; var_dump(filter_var($data, FILTER_VALIDATE_INT));
|
||||
echo "\n";
|
||||
@ -53,6 +55,8 @@ int(0)
|
||||
int(123)
|
||||
int(-123)
|
||||
int(0)
|
||||
int(0)
|
||||
int(0)
|
||||
int(123)
|
||||
bool(false)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user