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