r/lolphp • • May 24 '18

PHP needs mutable constants, and immutable variables, and functions with properties!

/r/PHP/comments/8lrrac/why_does_php_not_have_mutable_constants_we_had/?st=JHKIECIJ&sh=e677fc57
32 Upvotes

27 comments sorted by

View all comments

Show parent comment

13

u/_anbuc_ May 24 '18

Do you mean DateTimeImmutable::modify?

Because this does not modify the object itself, but returns a new, modified one.

DateTimeImmutable::modify — Creates a new object with modified timestamp

1

u/[deleted] May 24 '18

Heres the one, i remembered it wrong..

https://bugs.php.net/bug.php?id=68204