PrepAway - Latest Free Exam Questions & Answers

which sample will NOT alter the date to the value ‘2014-02-15’?

Given the following DateTime object, which sample will NOT alter the date to the value
‘2014-02-15’? $date = new DateTime(‘2014-03-15’);

PrepAway - Latest Free Exam Questions & Answers

A.
$date->sub(new DateInterval(‘P1M’));

B.
$date->setDate(2014, 2, 15);

C.
$date->modify(‘-1 month’);

D.
$date->diff(new DateInterval(‘-P1M’));


Leave a Reply

Your email address will not be published. Required fields are marked *