Throwable::getCode
(PHP 7, PHP 8)
Throwable::getCode — 获取异常代码
参数
此函数没有参数。
返回值
返回 Exception 的 int 异常代码, 但如果是 Exception 的子类,可能会使其他类型(例如,PDOException 返回的类型是 string )。
(PHP 7, PHP 8)
Throwable::getCode — 获取异常代码
此函数没有参数。
返回 Exception 的 int 异常代码, 但如果是 Exception 的子类,可能会使其他类型(例如,PDOException 返回的类型是 string )。