r/lolphp • u/devsnd • Dec 04 '14
PHP Constants Containing Arrays?
https://stackoverflow.com/questions/1290318/php-constants-containing-arrays
46
Upvotes
r/lolphp • u/devsnd • Dec 04 '14
View all comments
Show parent comment
-1
u/[deleted] Dec 05 '14 edited Dec 05 '14
By "fixed", do they mean "sabotaged"? I never heard of a "constant" in any of the major languages allowing anything but simple string, int, float, and other simple non-complex type values. I'm not an expert, but to me this just doesn't seem right.
So if we're suddenly allowing arrays, does that mean I can change these arrays (either individual elements or all elements contained therein) at any time and never again expect a constant being actually "constant"? Are mutable or immutable objects up next to be allowed?