adplus-dvertising
frame-decoration

Question

To create an object and set the date to JUNE 22, 2013, which one of the following statement should be executed?

a.

$date = Date(“22 JUNE 2013”)

b.

$date = new Date(“JUNE 22 2013”)

c.

$date = DateTime(“22 JUNE 2013”)

d.

$date = new DateTime(“22 JUNE 2013”)

Posted under PHP

Answer: (d).$date = new DateTime(“22 JUNE 2013”)

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. To create an object and set the date to JUNE 22, 2013, which one of the following statement should be executed?

Similar Questions

Discover Related MCQs

Q. Say you want to calculate the date 45 days from the present date which one of the following statement will you use?

Q. Which function displays the web page’s most recent modification date?

Q. Which one of the following function is useful for producing a timestamp based on a given date and time.

Q. If the format is F then which one of the following will be returned?

Q. Which one of the following format parameter can be used to identify timezone?

Q. The date() function returns ___ representation of the current date and/or time.

Q. Which one of the following function reads a directory into an Array?

Q. Which function is useful when you want to output the executed command result?

Q. Which function sets the file filename last-modified and last-accessed times?

Q. Which one of the following function outputs the contents of a string variable to the specified resource?

Q. Which one of the following function operates similarly to fgets(), except that it also strips any HTML and PHP tags form the input?

Q. Which one of the following function is capable of reading a specific number of characters from a file?

Q. Which one of the following function is capable of reading a file into a string variable?

Q. Which one of the following function is capable of reading a file into an array?

Q. Which one of the following PHP function is used to determine a file’s last access time?

Q. The filesize() function returns the file size in ___________

Q. Feof ( ) function is used in

Q. Sockets are not destroyed when script exits, is property of

Q. Fpassthru ( ) function writes result into a

Q. Syslog function is an example of