我在这段代码中有一个错误。请帮我解决它。
function holiday($today) {
$year = substr($today, 0, 4);
switch($today) {
case $year.'-01-01':
$holiday = 'New Year';
break;
case $today:
$today11 = new DateTime($today);
$R= $today11->format('l') . PHP_EOL;
$Sunday='0';
if($R == 0) {
$holiday = 'Sunday';
} else {
$holiday = 'Normal Day';
}
}
return $holiday;
}
echo $tday= holiday($today);