PHP Math functions is_nan
We can check a input or variable is a number or not by using is_nan function. Note that we can't check a string with this function.
We can check square root of a negative number with is_nan function. Here is a sample code to check.
Out put is
You can change the line $v=acos(1.1) with different values of variable $v and see the result.