Date_format () and date () accept the same parameters and return the same value, so what is the difference between them?
DateTimeAlias of a member function of the class.
DateTimeClasses are classes introduced after PHP5.2, except for
date()It makes no difference to be better.
The main difference between using the date() function and the DateTime object is that it’s easier to modify the date values. ——DateTime In PHP