Skip to content

Instantly share code, notes, and snippets.

@dam1r89
Created March 21, 2017 10:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dam1r89/0585c8efc923e63cc7b9ea4d20c60dbb to your computer and use it in GitHub Desktop.
Save dam1r89/0585c8efc923e63cc7b9ea4d20c60dbb to your computer and use it in GitHub Desktop.
Human readable alphanumeric code, only lower case (for easier usage)
<?php
// Repeating characters possible
echo substr(str_shuffle(str_repeat('0123456789abcdefghijklmnopqrstvwxyz', 5)), 0, 5);
// No repeating characters
echo substr(str_shuffle('0123456789abcdefghijklmnopqrstvwxyz'), 0, 5);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment