Zend
200-710 · Question #63
QUESTION 66 Given the following DateTime object, which sample will NOT alter the date to the value '2014-02-15'? $date = new DateTime('2014-03-15');
The correct answer is D. $date->diff(new DateInterval('-P1M'));. See the full explanation below for the reasoning.
Question
QUESTION 66
Given the following DateTime object, which sample will NOT alter the date to the value '2014-02-15'?
$date = new DateTime('2014-03-15');
Options
- A$date->sub(new DateInterval('P1M'));
- B$date->setDate(2014, 2, 15);
- C$date->modify('-1 month');
- D$date->diff(new DateInterval('-P1M'));
How the community answered
(25 responses)- A12% (3)
- B4% (1)
- C4% (1)
- D80% (20)
Community Discussion
No community discussion yet for this question.