Supported Versions: PHP 4 >= 4.2.0, PHP 5, PHP 7, PHP 8
Checks whether a float is NAN
<?php is_nan(float $num): bool
<?php                 switch (true) {

                    case \INF === $value:  $value = 'INF'; break;

                    case -\INF === $value: $value = '-INF'; break;

                    case is_nan($value):  $value = 'NAN'; break;

                    default:

                        $value = (string) $value;

                        if (!str_contains($value, $this->decimalPoint)) {