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