Created
April 16, 2018 06:41
-
-
Save alpenzoo/24302bad322e5de4a2dfb8c8c705c619 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$seed = str_split('abcdefghijklmnopqrstuvwxyz' | |
.'ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
.'0123456789!@#$%^&*()'); // and any other characters | |
shuffle($seed); // probably optional since array_is randomized; this may be redundant | |
$rand = ''; | |
foreach (array_rand($seed, 5) as $k) $rand .= $seed[$k]; | |
echo $rand; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment