workerman里这段代码能给讲讲么,没明白用途

ayamzh
// Compatible with php7
if(!class_exists('Error'))
{
    class Error extends Exception
    {
    }
}
1933 2 0
2个回答

six

貌似是php5没有Error异常,php7有,为了兼容,当Error类不存在时定义一个空Error类。

  • 暂无评论
ayamzh

感谢

  • 暂无评论
年代过于久远,无法发表回答
🔝