Generate number from seed

Each call runs MD5 on the seed again

@param int $min
@param int $max
@return int
436103
protected function rand($min, $max)
    {
        $this->seed = md5($this->seed);
        $rand = hexdec(substr($this->seed, 0, 8));
        return ($rand % ($max - $min + 1)) + $min;
    }
1288127
public static function number(int $min = 0, int $max = PHP_INT_MAX) : int
    {
        if ($max === $min) {
            return $max;
        }
        $rand = static::bytes(4);
        $rand = hexdec(bin2hex($rand));

        return $min + abs($rand % ($max - $min + 1));
    }
1215465
public function getRand($min = 0, $max = 0x7fffffff)
    {
        $t = ($this->x ^ ($this->x << 11)) & 0x7fffffff;
        $this->x = $this->y;
        $this->y = $this->z;
        $this->z = $this->w;
        $this->w = ( $this->w ^ ($this->w >> 19) ^ ( $t ^ ( $t >> 8 )) );
        return $this->w % ($max - $min + 1) + $min;
    }
1251880
public static function random($min, $max = null)
    {
        if (String::isEmpty($max) ||
            $max > getrandmax()) {
            $max = getrandmax();
        }

        return rand($min, $max);
    }
23981
public static function RAND($min = 0, $max = 0)
    {
        $min = PHPExcel_Calculation_Functions::flattenSingleValue($min);
        $max = PHPExcel_Calculation_Functions::flattenSingleValue($max);

        if ($min == 0 && $max == 0) {
            return (mt_rand(0, 10000000)) / 10000000;
        } else {
            return mt_rand($min, $max);
        }
    }
1031583
public static int getRandomNumber(int min, int max) {
		Random r = new Random();
		return r.nextInt(max - min + 1) + min;
	}
349266
private static function parseCronNumber($s, $min, $max): array
    {
        $result = array();
        $v1 = explode(",", $s);
        foreach ($v1 as $v2) {
            $v3 = explode("/", $v2);
            $step = empty($v3[1]) ? 1 : $v3[1];
            $v4 = explode("-", $v3[0]);
            $_min = count($v4) == 2 ? $v4[0] : ($v3[0] == "*" ? $min : $v3[0]);
            $_max = count($v4) == 2 ? $v4[1] : ($v3[0] == "*" ? $max : $v3[0]);
            for ($i = $_min; $i <= $_max; $i += $step) {
                if (intval($i) < $min) {
                    $result[$min] = $min;
                } elseif (intval($i) > $max) {
                    $result[$max] = $max;
                } else {
                    $result[$i] = intval($i);
                }
            }
        }

        ksort($result);

        return $result;
    }
1263713
public static function ints(int $min, int $max, int $n = 10) : array
    {
        if (($max - $min) < 0) {
            throw new InvalidArgumentException('Maximum cannot be'
                . ' less than minimum.');
        }

        if ($n < 1) {
            throw new InvalidArgumentException('Cannot generate less'
                . ' than 1 parameter.');
        }

        if ($n > ($max - $min + 1)) {
            throw new InvalidArgumentException('Cannot generate more'
                . ' unique integers than in range.');
        }

        $distribution = [];

        while (count($distribution) < $n) {
            $r = rand($min, $max);

            if (!in_array($r, $distribution)) {
                $distribution[] = $r;
            }
        }

        return $distribution;
    }
393815
public function length($min, $max = PHP_INT_MAX)
    {
        return $this->markErrorIf(strlen($this->value) < $min || strlen($this->value) > $max);
    }
404545
public function andBetween($key, $min, $max)
    {
        $value = sprintf('%s BETWEEN ? AND ?', $key);
        return $this->andAdd($value, [$min, $max]);
    }
1138650
public static function text($chars, $min, $max)
    {
        $length = mt_rand($min, $max);
        $charLength = mb_strlen($chars);
        $result = '';
        for($i = 0; $i < $length; ++$i)
        {
            $result .= mb_substr($chars, mt_rand(1, $charLength) - 1, 1);
        }
        return $result;
    }
176743
public function generate($min = 0, $max = null)
    {  
        if($max === null) {
            $max = 2796203;
        }
        
        if($max > 2796203) {
            throw new ReverseRegexException('Max param has exceeded the maxium 2796203');
        }
        
        if ($this->seed == 0) {
            $this->seed(mt_rand());
        }
        
        $this->seed = ($this->seed * 125) % 2796203;  
        
        
        return $this->seed % ($max - $min + 1) + $min;  
    }
525251
protected static function _rand($min, $max)
    {
        if (version_compare(PHP_VERSION, '7.0.0', 'ge')) {
            $value = random_int($min, $max);
        } else {
            $value = mt_rand($min, $max);
        }

        return $value;
    }
656988
private static function calculateMean($min, $max)
    {
        if ($min === null || $max === null) {
            return null;
        }

        return ($min + $max) / 2;
    }
1224770
public static function buildPHPRuntime($min, $max = null, $optional = false)
    {
        $returnValue = null;

        
        $returnValue = new common_configuration_PHPRuntime($min, $max, $optional);
        

        return $returnValue;
    }
764892
public function countByValue($min = '-inf', $max = '+inf'): int
    {
        return $this->handle->zCount($this->name, strval($min), strval($max));
    }
521753
private function binEncode($number, $min, $max, $bitcount)
        {
            if ($bitcount == 0)  return "";

            #echo "$bitcount: $min $max<br>";

            //this is our mid point - we will produce a bit to say
            //whether $number is above or below this mid point
            $mid = ($min + $max) / 2;

            if ($number > $mid) return "1" . $this->binEncode($number, $mid, $max, $bitcount - 1);
            else return "0" . $this->binEncode($number, $min, $mid,$bitcount - 1);
        }