random_int

Supported Versions: PHP 7, PHP 8
Get a cryptographically secure, uniformly selected integer
<?php random_int(int $min, int $max): int
<?php             public function getNumber()

            {

                return once(function () {

                    return random_int(1, 10000000);

                });

            }

        };
<?php             public function getNumber()

            {

                return once(function () {

                    return random_int(1, 10000000);

                });

            }

        };
<?php             {

                $closure = function () {

                    return once(function () {

                        return random_int(1, 1000);

                    });

                };
<?php             {

                $closure = function () {

                    return once(function () {

                        return random_int(1001, 2000);

                    });

                };
<?php             {

                $closure = function () {

                    return once(function () {

                        return random_int(1, 10000000);

                    });

                };
<?php         function globalFunction()

        {

            return once(function () {

                return random_int(1, 10000000);

            });

        }