以下是一个使用PHP简单异常的实例,通过表格形式展示异常的抛出和捕获过程。

| 步骤 | 代码示例 | 说明 |

实例php简单异常,PHP简单异常实例详解  第1张

| --- | --- | --- |

| 1 | ```php
function divide(int $a, int $b): int {
if ($b == 0) {
throw new Exception("