Created
March 26, 2021 08:33
-
-
Save yavgel85/6108cd7da3003bef6d5026b1d5ab2d89 to your computer and use it in GitHub Desktop.
Random Password #php #auth
This file contains 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
function random_password($length = 12) | |
{ | |
$chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()_-=+;:,.?"; | |
return substr(str_shuffle($chars), 0, $length); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment