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);

    }