你可以在没有iconv_substr的情况下重写php函数吗?

时间:2011-10-26 13:00:32

标签: php function timeout mamp

    for ($count = 0; $count < $strLength; $count++) {
        $this->_queryString[$count] = iconv_substr($inputString, $count, 1, $encoding);
    }

你可以用另一个函数替换iconv_substr来重写上面的php函数吗?我需要这样做,因为我的MAMP版本似乎是timeout on iconv_strlen

1 个答案:

答案 0 :(得分:1)

如果您的PHP安装可以使用多字节扩展名,请使用mb_substr

$this->_queryString[$count] = mb_substr($inputString, $count, 1, $encoding);