Vidyalelo
PHP · all questions

Date And Timestamp
practice.

Practice every MCQ with options. Use Show answers when you want the correct option and solution.

30

Questions

2/2

Page

Pick an option on a question to see the right answer and solution.

Which of the following functions do not return a timestamp?
1. time()
2. date()
3. strtotime()
4. localtime()
5. gmmktime()

Select an option to see the answer and solution.

The getdate() function returns

Select an option to see the answer and solution.

.......... Returns the time of sunrise for a given day / location.

Select an option to see the answer and solution.

What will the following script output?
<?php
$time = strtotime ('2004/01/01');
echo date ('H:i:s', $time);
?>

Select an option to see the answer and solution.

................Checks a date for numeric validity.

Select an option to see the answer and solution.

What is the difference, in seconds, between the current timestamp in the GMT time zone and the current timestamp in your local time zone?

Select an option to see the answer and solution.

You must make a call to ................... to specify what time zone you want calculations to take place in before calling any date functions.

Select an option to see the answer and solution.

What would happen if the following script were run on a Windows server set to Moscow, Russia’s time zone?
<?php
echo gmmktime(0, 0, 0, 1, 1, 1970);
?>

Select an option to see the answer and solution.

The ......... function parses an English textual date or time into a Unix timestamp.

Select an option to see the answer and solution.

................ Formats a local time or date according to locale settings.

Select an option to see the answer and solution.