The is_nan() function is used to check the passed parameter is number or not.
PHP is_nan() Function Example:
The is_nan() function is used to check the passed parameter is number or not. If it return true then the passed argument is number other wise it return nothing.
Syntax:
is_nan(x)
where x is required parameter for check.
Example:
<?php echo $return = is_nan(50) . "<br />"; echo $return = is_nan(-50). "<br />"; echo $return = is_nan(cos(5.10)). "<br />"; echo $return = is_nan(acos(5.10)); ?>
After running this example the output is:
Output:
1
[ 0 ] Comments