Add more tests for the new +0/-0 behaviour.

This commit is contained in:
Martin Jansen 2012-12-26 11:51:55 +01:00 committed by Lars Strojny
parent 3990641e62
commit dcd99c4b19

View File

@ -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)