Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

PHP is_nan() Function

PHP is_nan() Function

PHP Math Reference Manual PHP Math Reference Manual

Example

Check whether a value is not a number:

"; echo is_nan(acos(1.01)); ?>

Run Example »


Definition and Usage

The is_nan() function checks whether a value is not a number.

If the specified value is not a number, this function returns true (1). Otherwise it returns false/nothing.


Syntax

is_nan(

value

);

Parameters Description
value Required. Specifies the value to check.

Technical Details

Return Value: If both the value Returns TRUE if the value is not a number; otherwise, FALSE.
Return Type: Boolean
PHP Version: 4.2+

PHP Math Reference Manual PHP Math Reference Manual