|
is_numericFinds whether a variable is a number or a numeric string Description
bool is_numeric
( mixed
$var
)Finds whether the given variable is numeric. Numeric strings consist of optional sign, any number of digits, optional decimal part and optional exponential part. Thus +0123.45e6 is a valid numeric value. Hexadecimal (e.g. 0xf4c3b00c) and binary (e.g. 0b10100111001) notation is not allowed. Parameters
Return Values
Returns Examples
Example #1 is_numeric examples
<?php The above example will output: '42' is numeric '1337' is numeric '1337' is numeric '1337' is numeric '1337' is numeric '1337' is numeric 'not numeric' is NOT numeric 'Array' is NOT numeric '9.1' is numeric Changelog
See Also
|