msubstr方法的参数添加默认值,兼容php8
This commit is contained in:
parent
12dd79a3bc
commit
74b163ccba
@ -851,7 +851,7 @@ function format_bytes($size, $delimiter = '')
|
||||
* @param $length 截取长度
|
||||
* @return
|
||||
*/
|
||||
function msubstr($str, $start = 0, $length, $charset = "utf-8", $suffix = true)
|
||||
function msubstr($str, $start = 0, $length=1, $charset = "utf-8", $suffix = true)
|
||||
{
|
||||
if (function_exists("mb_substr")) {
|
||||
$slice = mb_substr($str, $start, $length, $charset);
|
||||
|
Loading…
x
Reference in New Issue
Block a user