## 22位不重复随机数
```
//生成22位guid
function getGuid(){
list($usec, $sec) = explode(" ", microtime());
$date = date('YmdHis',$sec);#14位
$arr = explode(".",$usec);
$sm = $date.substr($arr[1],0,7);#substr截取8位毫秒值的前7位,后两位为00
$guid = $sm.mt_rand(1,9);#mt_rand产生1位
return $guid;
}
```