mirror of
https://gitee.com/apiadmin/ApiAdmin.git
synced 2025-04-06 03:58:00 +08:00
modified 兼容PHP-7.4.*版本
This commit is contained in:
parent
28c8927e59
commit
f1e129f752
@ -20,7 +20,7 @@ class Strs {
|
|||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public static function uuid(): string {
|
public static function uuid(): string {
|
||||||
$charId = md5(uniqid(mt_rand(), true));
|
$charId = md5(uniqid(strval(mt_rand()), true));
|
||||||
$hyphen = chr(45);
|
$hyphen = chr(45);
|
||||||
$uuid = chr(123)
|
$uuid = chr(123)
|
||||||
. substr($charId, 0, 8) . $hyphen
|
. substr($charId, 0, 8) . $hyphen
|
||||||
|
Loading…
x
Reference in New Issue
Block a user