Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Zend Exam 200-710 Topic 4 Question 71 Discussion

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

Which of the following will NOT instantiate a DateTime object with the current timestamp?

Show Suggested Answer Hide Answer
Suggested Answer: A

Contribute your Thoughts:

Brandon
1 months ago
Wait, so we're creating dates now? I thought this was a coding exam, not a horoscope reading!
upvoted 0 times
Stephaine
1 days ago
C) $date = new DateTime('now');
upvoted 0 times
...
An
5 days ago
B) $date = new DateTime('@' . time());
upvoted 0 times
...
Jesusita
8 days ago
A) $date = new DateTime();
upvoted 0 times
...
...
Latrice
2 months ago
I'm going with Option C. 'now' is such a natural way to express the current time, it's gotta be the right choice.
upvoted 0 times
Jennifer
13 days ago
User 3: I'm not sure, but I'll go with Option B because it includes the current timestamp in the format '@' . time().
upvoted 0 times
...
Bette
22 days ago
User 2: I'm going with Option C, 'now' seems like the most straightforward way to get the current timestamp.
upvoted 0 times
...
Cheryll
28 days ago
User 1: I think Option A is the correct choice.
upvoted 0 times
...
...
Verona
2 months ago
Ah, the classic 'new DateTime()' is always a safe bet. No need to get fancy, just let PHP do the work for you.
upvoted 0 times
Bronwyn
7 days ago
User 4: C) $date = new DateTime('now'); is also a valid choice, but A) is the classic method.
upvoted 0 times
...
Harrison
22 days ago
User 3: B) $date = new DateTime('@' . time()); is another option, but A) is more straightforward.
upvoted 0 times
...
Marylyn
23 days ago
User 2: Yeah, that's the simplest way to get the current timestamp.
upvoted 0 times
...
Kimberlie
1 months ago
User 1: I always go with A) $date = new DateTime();
upvoted 0 times
...
...
Sharan
2 months ago
I was thinking Option B might work, but then I realized it's just using the timestamp as a string. Gotta be careful with those tricks!
upvoted 0 times
...
Cheryl
2 months ago
Option D looks like the right answer. Using `time()` directly doesn't create a DateTime object, it just gives you the current timestamp.
upvoted 0 times
Rebbecca
1 months ago
User 2: Yeah, using `time()` directly doesn't create a DateTime object.
upvoted 0 times
...
Youlanda
1 months ago
User 1: I think option D is correct.
upvoted 0 times
...
...
Sherell
2 months ago
I believe options A, B, and C are correct because they all provide valid ways to instantiate a DateTime object with the current timestamp.
upvoted 0 times
...
Angelyn
2 months ago
I agree with Quiana. Option D is incorrect because the DateTime constructor expects a string, not an integer like time().
upvoted 0 times
...
Quiana
2 months ago
I think option D will NOT instantiate a DateTime object with the current timestamp.
upvoted 0 times
...

Save Cancel
az-700  pass4success  az-104  200-301  200-201  cissp  350-401  350-201  350-501  350-601  350-801  350-901  az-720  az-305  pl-300  

Warning: Cannot modify header information - headers already sent by (output started at /pass.php:70) in /pass.php on line 77