php中的try catch

try {
// Code that may throw an Exception or Error.
} catch (Throwable $t) {
// Executed only in PHP 7, will not match in PHP 5.x
} catch (Exception $e) {
// Executed only in PHP 5.x, will not be reached in PHP 7
}
posted @ 2023-11-29 20:06  zhouhn  阅读(7)  评论(0编辑  收藏  举报