主页
PHP
PHP finally 关键字
tryphp_keyword_finally
运行 ❯
×
更改方向
保存代码
更改主题
<?php echo "Starting the process."; try { // Select randomly between 0 and 1, throw an exception if 1 is selected. $random = rand(0, 1); if($random == 1) { throw new Exception("Exception"); } } finally { echo "Process complete"; } ?>