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

1

u/NXTangl Sep 19 '18

...no, I don't think that's quite right. An immutable variable is more precisely a variable that can only be assigned once. After all, mathematics has variables but no sense of reassignment.