To find out the current year is leap year or not which
date() function we've to use.Give the syntax also
Answer Posted / vaneet badhan
to check the current year code is :
date("L");
output will be 1 coz 2008 is a leap year.
better way to check is :
$year=2008;
echo date("L",mktime(1,1,1,1,1,$year));
now you can check any year by just changing the value of
variable $year, this is called dynamic programming.
| Is This Answer Correct ? | 4 Yes | 3 No |
Post New Answer View All Answers
what is PDO?
What is a php trait?
Difference between $message vs. $$Message in php.
How to know user has read the email-php?
Explain the difference between static and dynamic websites?
What exactly is PHP?
Is php session id unique?
How to remove all duplicate values in array in php?
What is isset in php form?
How to delete cookie files on your computer?
Do csrf tokens expire?
What is htmlentities function in php?
What is the current stable version of php?
Explain how can php and javascript interact?
what the new feature add in php 7.2?