📅  最后修改于: 2022-03-11 14:54:11.587000             🧑  作者: Mango
// Example usage for: Ternary Operator
$action = $_POST['action'] ?: 'default';
// The above is identical to this if/else statement
if (empty($_POST['action'])) {
$action = 'default';
} else {
$action = $_POST['action'];
}