Possible Duplicate:
Change the value of a previously-defined constant
There is a constant ABC and I need to get its value, save it, change, do some actions and restore. But I was told that it isn't possible. Please, tell me, is it true? If no, tell me, how can I get value from a constant and set my value for it?
This is not possible. The point of a constant is to not be changed, and once a constant is defined it cannot be redefined or deleted.
However there are options. You could use normal variables or maybe this can be helpfull in some way: Un-define constants with define/apc_define_constants in PHP
According to that post you can use the apc_* functions to undefine and define it. So you can change it in the fashion of deleting it, and creating it again with a new value.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With