is_nan

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     protected function serialize($value)

    {

        return is_numeric($value) && ! in_array($value, [INF, -INF]) && ! is_nan($value) ? $value : serialize($value);

    }
<?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)) {