    function RandomCompat_intval($number, $fail_open = false)
    {
        if (is_numeric($number)) {
            $number += 0;
        }

        if (
            is_float($number)
            &&
            $number > ~PHP_INT_MAX
            &&
            $number < PHP_INT_MAX
        ) {
            $number = (int) $number;
        }

        if (is_int($number) || $fail_open) {
            return $number;
        }

        throw new TypeError(
            'Expected an integer.'
        );
    }
The software uses a Pseudo-Random Number Generator (PRNG) but does not correctly manage seeds.