I think there is a bug in this filter_var or maybe I'm doing something wrong: Try this:
$options = array(
'options' => array(
'default' => 3,
'min_range' => 1000.0,
'max_range' => 5000.6,
)
);
$VariableValue2 = 5698;
$VariableValue4 = 5698.2;
$chicco3 = filter_var($VariableValue2, FILTER_VALIDATE_INT, $options);
$chicco4 = filter_var($VariableValue4, FILTER_VALIDATE_FLOAT, $options);
It suppose to don't validate it... Infact the value: 5698 is greater than 5000.6!!!! But with FILTER_VALIDATE_INT it work FINE!! It return 3 that is the default value in case it don't validate it... PERFECT...
Bunun yerine, FILTER_VALIDATE_FLOAT ile bunu doğrulamak ... Bu 5698,2 dönecektir! Ben yanlış bir şey yapıyorum??
Herkese teşekkür ederim ...
Samuele