Home >>PHP Math Functions >PHP is_nan() Function

PHP is_nan() Function

PHP is_nan() Function

PHP is_nan() function is used to checks whether the given input value is 'not a number'. It accepts only a single parameter that is the given value to be checked. It returns TRUE (1) as output if the specified value is 'not-a-number' otherwise it returns FALSE or nothing as output.

Syntax:

  is_nan(value);

Parameter Values

Parameter Description
value This is a required parameter. This parameter defines the value to check.

Here is an example of is_nan() function in PHP:

<html>
<body>

<?php

echo is_nan(200)."<br>";
echo is_nan(log(0))."<br>";
echo is_nan(acos(23.33))."<br>";
echo is_nan(asin(3.33))."<br>";

?>

</body>
</html>
Output:


1
1

No Sidebar ads