dechex($one)十进制转为16进制,$res = str_pad($input, 10, "==")使用另一个字符串填充字符串为指定长度

/** 
* @Purpose: 
* 创建唯一的uid
* @Method Name: create_guid()

* @Param:

* @Author: NoelXue
* @DATE:2017-10-13 14:52
* @Return:
/
public function create_guid(){
m i c r o T i m e = m i c r o t i m e ( ) ; l i s t ( microTime = microtime(); list( microTime=microtime();list(a_dec, $a_sec) = explode(" ", $microTime);
d e c h e x = d e c h e x ( dec_hex = dechex( dechex=dechex(a_dec
1000000);
s e c h e x = d e c h e x ( sec_hex = dechex( sechex=dechex(a_sec);
t h i s − > e n s u r e l e n g t h ( this->ensure_length( this>ensurelength(dec_hex, 5);
t h i s − > e n s u r e l e n g t h ( this->ensure_length( this>ensurelength(sec_hex, 6);
$guid = “”;
$guid .= $dec_hex;
$guid .= $this->create_guid_section(3);
$guid .= $this->create_guid_section(4);
$guid .= $this->create_guid_section(4);
$guid .= $this->create_guid_section(4);
$guid .= $sec_hex;
$guid .= $this->create_guid_section(6);
return $guid;
}

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值