[色子游戏]奖池配置
This commit is contained in:
@@ -2,3 +2,15 @@
|
||||
/**
|
||||
* Here is your custom functions.
|
||||
*/
|
||||
|
||||
/**
|
||||
* mb_split 兼容:当 PHP 未启用 mbstring 或 mb_split 不可用时,用 preg_split 模拟
|
||||
* 解决 Illuminate\Support\Str::studly() 在 Windows 等环境下报 Call to undefined function mb_split() 的问题
|
||||
*/
|
||||
if (!function_exists('mb_split')) {
|
||||
function mb_split(string $pattern, string $string, int $limit = -1): array
|
||||
{
|
||||
$regex = '/' . str_replace('/', '\\/', $pattern) . '/u';
|
||||
return preg_split($regex, $string, $limit === -1 ? -1 : $limit) ?: [];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user