Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $groups = [];
- $groups[] = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','r','s','t','u','v','x','y','z'];
- $groups[] = ['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','R','S','T','U','V','X','Y','Z'];
- $groups[] = ['1','2','3','4','5','6','7','8','9','0'];
- $groups[] = ['.',',','(',')','[',']','!','?','&','^','%','@','*','$','<','>','/','|','+','-','{','}','`','~'];
- $password = [];
- foreach ($groups as $group) {
- shuffle($group);
- $symbols = array_slice($group, 0, rand(3, 7));
- $password = array_merge($password, $symbols);
- }
- shuffle($password);
- $password = implode('', $password);
- echo $password;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement