Using PHP 7 new secure random functions in PHP 5 with paragonie/random_compat

Code
<?php

// PHP 7 native functions
// functions implemented for PHP 5 in paragonie/random_compat

try {
    $int = random_int(0, 128);
} catch (Error $e) {
    echo $e->getMessage();
} catch (Exception $e) {
    echo $e->getMessage();
}

dump($int);


try {
    $string = random_bytes(32);
} catch (Error $e) {
    echo $e->getMessage();
} catch (Exception $e) {
    echo $e->getMessage();
}

dump(bin2hex($string));
Result
^ 43

^ "56719fdd74e9d4d4a32140c09b557ffaa3d449566e3dc8acbbbede22feffd816"
Used Versions
PHP 8.3, Laminas MVC 3.2, Symfony 5.2, Laravel 8.28, PHPUnit 9.5, Doctrine ORM 2.8