123456789101112131415161718192021222324252627282930313233343536373839 |
- <?php
- declare(strict_types=1);
- function isLeap(int $year): bool
- {
- if ($year % 400 == 0) {
- return true;
- }
- if ($year % 100 == 0) {
- return false;
- }
- if ($year % 4 != 0) {
- return false;
- }
- return true;
- }
|