公历闰年判定遵循的规律为:四年一闰,百年不闰,四百年再闰。
-
-
$year=1900;
-
if(($year%4 == 0 && $year%100 != 0) || ($year%400 == 0 )) {
-
echo "$year is run yerar.
";
-
}else {
-
-
echo "$year is ping year.
";
-
}
-
-
$a=10;
-
$b=$a++ + ++$a;
-
echo $a."
";
-
echo $b."
";
-
?>
输出:
10
22
原因:
左自增比右自增优先级高,所以是$b=$a + (++(++$a))=10+12=22
阅读(5125) | 评论(0) | 转发(0) |