is_numeric [function]
is_numeric( var )
returns whether the variable var
is numeric - one of bool/int/real or a numeric string
- all types that can always be converted to numbers are considered numeric, with two exceptions:
- convertible objects are not numeric since validation requires an interface call and unnecessary interface calls cannot be made
- null value is considered to be the lack of a better value, thus it cannot be considered valid, even though it always maps implicitly to the integer 0
is_numeric( 12.124 ); // returns true
is_numeric( "what" ); // returns false