fork(1) download
  1. <?php
  2.  
  3.  
  4. $word = array('а','б','в','г','д');
  5.  
  6. $number = count($word);
  7.  
  8.  
  9. $random = mt_rand(0, $number - 1);
  10.  
  11. echo $random;
  12.  
  13. $swan = $word[$random];
  14.  
  15. echo $swan;
  16.  
  17.  
  18.  
Success #stdin #stdout 0.02s 24448KB
stdin
Standard input is empty
stdout