Skip to content

Instantly share code, notes, and snippets.

@alemohamad
Last active August 29, 2015 14:05
Show Gist options
  • Save alemohamad/4611c6d9d6e0133bba4c to your computer and use it in GitHub Desktop.
Save alemohamad/4611c6d9d6e0133bba4c to your computer and use it in GitHub Desktop.
<?php
function readable_pass() {
$vowels = 'aeiou';
$consonants = 'bcdfghjklmnpqrstvwxyz';
$result = null;
for($i = 0; $i < 10; $i++) {
if($i % 2)
$result .= substr(str_shuffle($consonants), 0, 1);
else
$result .= substr(str_shuffle($vowels), 0, 1);
}
return $result;
}
echo readable_pass();
// eg: iterofuweq
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment