3 ms·
The behaviour is not completely dissimilar. The only difference between the two methods is what is done with the result. In fact, every method in that class par
by shawnz 12y ago
The behaviour is not completely dissimilar. The only difference between the two methods is what is done with the result. In fact, every method in that class parallels one from the other class in exactly that way, and that behaviour is described clearly on the documentation page for the class:
> This class behaves the same as DateTime except it never modifies itself but returns a new object instead.
http://www.php.net/manual/en/class.datetimeimmutable.php http://www.php.net/manual/en/class.datetimeimmutable.php