                throw new TypeError(
                    'RandomCompat_substr(): Third argument should be an integer, or omitted'
                );
            }

            // Consistency with PHP's behavior
            if ($start === RandomCompat_strlen($binary_string) && $length === 0) {
                return '';
            }
            if ($start > RandomCompat_strlen($binary_string)) {
                return false;
            }

            return mb_substr($binary_string, $start, $length, '8bit');
        }
The software uses a Pseudo-Random Number Generator (PRNG) but does not correctly manage seeds.