fork(282) download
  1. <?php
  2.  
  3. $seed = str_split('abcdefghijklmnopqrstuvwxyz'
  4. .'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
  5. .'0123456789!@#$%^&*()'); // and any other characters
  6. shuffle($seed); // probably optional since array_is randomized; this may be redundant
  7. $rand = '';
  8. foreach (array_rand($seed, 5) as $k) $rand .= $seed[$k];
  9.  
  10. echo $rand;
Success #stdin #stdout 0.01s 20520KB
stdin
Standard input is empty
stdout
lg(BL