PHP Classes

File: LeapYearChecker_example.php

Recommend this page to a friend!
  Classes of Ellery Leung   Leap year checker   LeapYearChecker_example.php   Download  
File: LeapYearChecker_example.php
Role: Example script
Content type: text/plain
Description: Leap Year Checker example
Class: Leap year checker
Check whether a given year is a leap year
Author: By
Last change:
Date: 17 years ago
Size: 613 bytes
 

Contents

Class file image Download
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=big5">
<title>Leap Year Checker</title>
</head>

<body>
<?php
include("LeapYearChecker.class.php");
$LYC = new LeapYearChecker();
$LYC->isLeapYear(1999) == true ? print "Is leap year." : print "Not leap year";
print
"<br/>";
$LYC->isLeapYear(2000) == true ? print "Is leap year." : print "Not leap year";
print
"<br/>";
$LYC->isLeapYear(2006) == true ? print "Is leap year." : print "Not leap year";
?>
</body>
</html>