Home / CSE / PHP - CS :: Discussion

Discussion :: PHP - CS

  1. Which method is simply an object-oriented version of date()?

  2. A.

     DateTime::format()

    B.

     DateTime::modify()

    C.

     DateTime::setTime()

    D.

     DateTime::setDate()

    View Answer

    Workspace

    Answer : Option A

    Explanation :

    The format() method is simply an object-oriented version of date(). It takes $dateFormat as an argument. $dateFormat is a string consisting of the same date formatting characters accepted by the procedural date() function.


Be The First To Comment