关于下面的代码,我怎样才能在 PHP 中不抛出异常的情况下进入finally?
try {
$db = DataSource::getConnection();
if (some condition here is TRUE) {
// go to finally without throw an exception
}
$stmt = $db->prepare($sql);
$stmt->saveMyData();
} catch (Exception $e) {
die($e->getMessage());
} finally {
$db = null;
}
喵喵时光机