📄 03c03-1.php
字号:
<?php// Let's you know if a certain year is a leap year or not:function is_leap_year($y) { // If the year is divisible by 4 but not by 100 unless by 400 return ((($y % 4) == 0) && ((($y % 100) != 0) || (($y % 400) == 0)));}// Determine for a few years if they are leap years or not:foreach (range(1999, 2009) as $year) { // Output the result: echo "<p>{$year} = ", is_leap_year($year) ? 'Leap Year' : 'not', '</p>';}?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -