📅  最后修改于: 2022-03-11 14:53:51.239000             🧑  作者: Mango
$name = $_GET['name'] ?? $_POST['name'] ?? 'nobody';
//it is equavelent to below conditions
if (isset($_GET['name'])) {
$name = $_GET['name'];
} elseif (isset($_POST['name'])) {
$name = $_POST['name'];
} else {
$name = 'nobody';
}