$error_message = "An error occurred";
die($error_message);
$value = 10;
if ($value < 5) {
die("Value must be greater than 5");
}
try {
// 一些可能引發異常的代碼
} catch (Exception $e) {
die("An exception occurred: " . $e->getMessage());
}
$user = array("name" => "John", "age" => 30);
die(print_r($user, true));
if ($condition) {
die(header("Location: error.php"));
}