Why does filter_var require the FLAG FILTER_FLAG_ALLOW_FRACTION for floats?

When using filter_var to validate float values, the FILTER_FLAG_ALLOW_FRACTION flag must be included in order to allow decimal fractions in the input. This flag ensures that the filter accepts float values with decimal points, which are common in floating-point numbers. Without this flag, the filter would not recognize float values with fractions as valid input.

// Validate a float value with decimal fraction
$value = '3.14';
if (filter_var($value, FILTER_VALIDATE_FLOAT, FILTER_FLAG_ALLOW_FRACTION)) {
    echo "Valid float value";
} else {
    echo "Invalid float value";
}