主页
PHP
PHP Exception getTrace() 方法
tryphp_exception_gettrace
运行 ❯
×
更改方向
保存代码
更改主题
<?php function myFunction($num) { throw new Exception("An error occurred"); } try { myFunction(5); } catch (Exception $e) { print_r($e->getTrace()); } ?>