71

PHP7中的异常与错误处理 | novnan's notes

 6 years ago
source link: https://novnan.github.io/PHP/throwable-exceptions-and-errors-in-php7/?
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
PHP 中的 Exception, Error, ThrowablePHP 中将代码自身异常(一般是环境或者语法非法所致)称作错误 Error,将运行中出现的逻辑错误称为异常 Exception错误是没法通过代码处理的,而异常则可以通过 try/catch 来处理PHP7 中出现了 Throwable 接口,该接口由 Error 和 Exception 实现,用户不能直接实现 Throwable

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK