I am considering options to use in generating a 5 character unique string in php. Or if anyone have a better option. I'm not sure if substr will actually reduces the reliability of the uniqueness as well. All advise appreciated.
Option1:
$unique_id=substr(md5(time()), -5);
OR
Option2:
$unique_id=substr(uniqid, -5);