您可以将preg_replace替换为preg_replace_callback

时间:2019-11-09 23:02:05

标签: php

  

preg_replace():/ e修饰符不再受支持,请改用preg_replace_callback

相关代码:

// Unserialize links array
    private function utf_unserialize($serial_str) 
    {
        $out = preg_replace('!s:(\d+):"(.*?)";!se', "'s:'.strlen('$2').':\"$2\";'", $serial_str );
        return unserialize($out);   
    }
}

0 个答案:

没有答案