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

Which of the following will NOT instantiate a Date Time object with the current timestamp?
A . $date= new DateTime();
B . $date= new DateTime(‘@’ . time());
C . $date= new DateTime(‘now’);
D . $date = new DateTime(time());

Answer: D

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments