PHP生成唯一订单号 阿星小栈

/**
*
* uniqid - 官方是这样说的:
* Gets a prefixed unique identifier based on the current time in microseconds.
*/
function build_order_no()
{
    return date('Ymd').substr(implode(NULL, array_map('ord', str_split(substr(uniqid(), 7, 13), 1))), 0, 8);
}


原文:https://blog.csdn.net/chajinglong/article/details/52598757 

原文地址:https://www.cnblogs.com/dereckbu/p/9962950.html