join(''); $joined = strtolower($joined); $joined = preg_replace('/[^a-z0-9]/', '', $joined) ?? ''; return $joined !== '' ? $joined : 'v'; } /** * 随机强密码:每次不同,长度至少 12,含大小写字母、数字与符号。 */ public static function randomPassword(int $length = 16): string { $length = max(12, $length); return Str::password($length, true, true, true, false); } }