Which Of The Following Is The Right Way To Use The Datetime #184
Which of the following is the right way to use the DateTime class?
This multiple choice question (MCQ) is related to the book/course gs gs107 PHP: Hypertext Preprocessor. It can also be found in gs gs107 PHP File and Session Handling - PHP Dates and Time - Quiz No.1.
Which of the following is the right way to use the DateTime class?
$date = get_Class(DateTime);
$date = class DateTime;
$date = new DateTime();
$date = new class DateTime();