Register Now

Login

Lost Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

What will be the output of the following PHP code?
<?php
echo (checkdate(4,31,2010) ? ‘Valid’ : ‘Invalid’);
?>

What will be the output of the following PHP code?
<?php
echo (checkdate(4,31,2010) ? ‘Valid’ : ‘Invalid’);
?>
a) TRUE
b) FALSE
c) Valid
d) Invalid

Answer: d
Explanation: The function checkdate() is used to validate a Gregorian date. In the program, April has 30 days and the above date is 31 therefore Invalid is returned.

Join The Discussion