Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 0d 23h 51m 32s Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Zend Exam 200-710 Topic 2 Question 48 Discussion

Actual exam question for Zend's 200-710 exam
Question #: 48
Topic #: 2
[All 200-710 Questions]

Given a DateTime object that is set to the first second of the year 2014, which of the following samples will correctly return a date in the format '2014-01-01 00:00:01'?

Show Suggested Answer Hide Answer
Suggested Answer: B

Contribute your Thoughts:

Ricarda
4 days ago
I'm gonna go with Option C. It's the most straightforward and doesn't require any extra parameters or arrays.
upvoted 0 times
...
Mose
6 days ago
Option C is the correct answer. It's the simplest and most direct way to format the DateTime object as required.
upvoted 0 times
...
Susana
22 days ago
I'm not sure, but I think D) $date = date('Y-m-d H:i:s', $datetime); might also work. It seems like it could convert the DateTime object to the correct format.
upvoted 0 times
...
Myong
1 months ago
I agree with Vanna. Option C) makes sense because it directly formats the DateTime object in the desired format.
upvoted 0 times
...
Vanna
1 months ago
I think the correct answer is C) $datetime->format('Y-m-d H:i:s'). It seems like the most straightforward option.
upvoted 0 times
...

Save Cancel
a