Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Generate a random integer
<?php rand(): int
<?php             public function getNumber()

            {

                return once(function () {

                    return rand(1, 10000000);

                });

            }

        };
<?php             public function getNumberForLetter($letter)

            {

                return once(function () use ($letter) {

                    return $letter.rand(1, 10000000);

                });

            }

        };
<?php             public static function getNumber()

            {

                return once(function () {

                    return rand(1, 10000000);

                });

            }

        };
<?php             public static function getNumberForLetter($letter)

            {

                return once(function () use ($letter) {

                    return $letter.rand(1, 10000000);

                });

            }

        };
<?php     public function __construct()

    {

        $this->randomNumber = rand(1, 1000000);

    }



    public function getRandomNumber()