fork(1) download
  1. <?php
  2. //от 1 до 100000000 случайные числа, выедем 50;
  3. $length=5;
  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 25736KB
stdin
Standard input is empty
stdout
Array
(
    [0] => 8
    [1] => 1
    [2] => 7
    [3] => 2
    [4] => 5
)