fork(1) download
  1. <?php
  2. //от 1 до 100000000 случайные числа, выедем 50;
  3. $length=9;
  4. $start=1;
  5. $end=10;
  6. $array=array();
  7. while (count($array)<$length) {
  8. $array[mt_rand($start,$end)]="";
  9. }
Success #stdin #stdout 0.02s 25564KB
stdin
Standard input is empty
stdout
Array
(
    [0] => 9
    [1] => 10
    [2] => 7
    [3] => 4
    [4] => 8
    [5] => 3
    [6] => 1
    [7] => 2
    [8] => 6
)