RosettaCodeData/Task/Leap-year/PHP/leap-year-1.php

8 lines
135 B
PHP
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
<?php
function isLeapYear($year) {
if ($year % 100 == 0) {
return ($year % 400 == 0);
}
return ($year % 4 == 0);
}