- mt_rand: documentation ( source)
- array_rand: documentation ( source)
<?php
$test = array();
$i = 10000;
while ($i--) {
$test[] = mt_rand(0,99999);
}
class Foo {
public function __construct ($input) {
echo $input[array_rand($input)] + 1;
}
}