Skip to content

Instantly share code, notes, and snippets.

@zetas
Created January 30, 2014 12:01
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 zetas/8707088 to your computer and use it in GitHub Desktop.
Save zetas/8707088 to your computer and use it in GitHub Desktop.
Secure UUID Generation in PHP. Change 16 to get a larger or smaller uuid.
$bytes = openssl_random_pseudo_bytes(16);
$uuid = bin2hex($bytes);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment