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

| --- | --- | --- |
| 1 | ```php
function divide(int $a, int $b): int {
if ($b == 0) {
throw new Exception("
以下是一个使用PHP简单异常的实例,通过表格形式展示异常的抛出和捕获过程。
| 步骤 | 代码示例 | 说明 |

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