PHP

PHP

Date and Timestamp has 9 Questions
What will be the output of the following PHP code?
  1.     <?php
  2.     echo (checkdate(4,31,2010) ? 'Valid' : 'Invalid');
  3.     ?>

TRUE
FALSE
Valid
Invalid
The date() function returns ___ representation of the current date and/or time.

Integer
String
Boolean
Float
Which one of the following format parameter can be used to identify timezone?

T
N
E
I
If the format is F then which one of the following will be returned?

Complete text representation of month
Day of month, with leading zero
Daylight saving time
Day of month, without zeros
What will be the output of the following code? If say date is 22/06/2013.
  1.     <?php
  2.     echo "Today is ".date("F d, Y")
  3.     ?>

Today is 22 June, 2013
Today is 22-06-2013
Today is 06-22-2013
Today is June 22, 2013
Which function displays the web page's most recent modification date?

lastmod()
getlastmod()
last_mod()
get_last_mod()
Say you want to calculate the date 45 days from the present date which one of the following statement will you use?

totime("+45"?)
totime("+45 days"?)
strtotime("+45 days"?)
strtotime("-45 days"?)
To create an object and set the date to JUNE 22, 2013, which one of the following statement should be executed?

$date = Date("22 JUNE 2013"?)
$date = new Date("JUNE 22 2013"?)
$date = DateTime("22 JUNE 2013"?)
$date = new DateTime("22 JUNE 2013"?)
Which one of the following function is useful for producing a timestamp based on a given date and time.

time()
mktime()
mrtime()
mtime()