<?php
bool is_nan ( float $num )
where,
$num = The value to check
?>
<?php
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
The is_nan function accepts
only float number as a parameter
If this is not taken into account,
an Warning: is issued in PHP 7.4.XX
or a
Fatal error: in PHP 8.0.XX
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
function isnan ($par)
{
if (is_nan($par) == TRUE)
{
var_dump($par);
echo '<br>"Variable IS NOT a number"<br><br>';
}
else
{
var_dump($par);
echo '<br><br><br>';
}
}
$a = acos(3);
isnan($a);
isnan(M_E);
$x04p = 1.6e-19;
isnan($x04p);
$arr = [ 2, 4, 6 ];
isnan($arr);
?>