PHP生成订单号

//生成订单号 [0.015秒内绝不重复][14位][纯数字]function build_order_no(){//19051697489855return
//生成订单号 [0.015秒内绝不重复][14位][纯数字]
function build_order_no(){//19051697489855return date("ymd").substr(implode(NULL, array_map('ord',str_split(substr(uniqid(),7,13),1))),0,8);
}//生成订单号 [永远不重复][32位][含英文]
function getGuid() {//99E628D8E65756E3740B54F64A00A09C$charid = strtoupper(md5(uniqid(mt_rand(), true))); return $charid; 
}//生成码库function randomkeys($length,$gid) { $pattern = '1234567890abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLOMNOPQRSTUVWXYZ';for($i=0;$i<$length;$i++) { $key .= $pattern{mt_rand(0,35)}; //生成php随机数 } return strtoupper($gid.$key); } echo randomkeys(8);exit;