php高并发下生成绝对不重复标识

php的uniqid()函数生成的标识在高并发下(例如循环)会重复,以下方法生成不重复标识:

1、md5(uniqid(md5(microtime(true)),true))

2、session_create_id(),php7.1以上支持。