It need not be meaningful words - more like random password generation, but the catch is - they should be unique. I will be using this for some kind of package / product cod
substr(str_shuffle(md5(microtime())),rand(0,21),7);
Here's a way you could do it without hashes or loops:
$password = sprintf(
"%04s%03s",
base_convert(mt_rand(0, pow(36, 4) - 1), 10, 36),
base_convert(mt_rand(0, pow(36, 3) - 1), 10, 36)
);
As a few others have mentioned, ensuring uniqueness is more complicated, and should be unneeded. The simplest way you could do it would be to add extra characters at the end, incrementing with each password generated.
md5( microtime() );