diff --git a/include/GeraNumero.php b/include/GeraNumero.php index 15637d2..24ca988 100644 --- a/include/GeraNumero.php +++ b/include/GeraNumero.php @@ -35,10 +35,10 @@ public function __construct() */ private function __gerarNumero() { - $numero = rand($this->min, $this->max); + $numero = mt_rand($this->min, $this->max); if ( !empty($this->numeros) && count($this->numeros) < $this->max ) { while(in_array($numero, $this->numeros)) { - $numero = rand($this->min, $this->max); + $numero = mt_rand($this->min, $this->max); } } else { if ( count($this->numeros) >= $this->max ) { @@ -52,4 +52,4 @@ private function __gerarNumero() } -new GeraNumero(); \ No newline at end of file +new GeraNumero();