My way isn't as elegant, but a different option might be like this:
if (($year%4==0 && $year%100<>0)||($year%4==0 && $year%400==0))
echo "$year is a leap year";
else
echo "$year isn't a leap year";
Basically the rule is if the year is a leap year if:
divisible by 4
not divisible by 100
* unless the year is divisible by 400
Not that we have to worry about the 400 rule for another 394 years...