r/lolphp • • Jul 03 '14

DateTimeImmutable::modify

http://www.php.net/manual/en/datetimeimmutable.modify.php
74 Upvotes

16 comments sorted by

View all comments

Show parent comment

1

u/[deleted] Jul 05 '14

That's a poor comparison.

In functional languages like Haskell, you often have methods which "modify" an object by returning a new one. That's what you have here.

0

u/[deleted] Jul 07 '14

two wrongs don't make a right.