Home » PHP Leap Year Program

PHP Leap Year Program

by Online Tutorials Library

Leap Year Program

A leap year is the one which has 366 days in a year. A leap year comes after every four years. Hence a leap year is always a multiple of four.

For example, 2016, 2020, 2024, etc are leap years.


Leap Year Program

This program states whether a year is leap year or not from the specified range of years (1991 – 2016).

Example:

Output:

PHP Leap year 1


Leap Year Program in Form

This program states whether a year is leap year or not by inserting a year in the form.

Example:

Output:

On entering year 2016, we get the following output.

PHP Leap year 2

On entering year 2019, we get the following output.

PHP Leap year 3

You may also like