> Hello internals! > > I was wondering, has there been any discussion about supporting local > constants (variables that cannot be reassigned, perhaps even function > parameters)? >
As for me, I would've hoped that there were local constants in PHP and I'd want to provide some thoughts on this regard. In my opinion, I'd really love the following syntax: a = 'the constant value'; I'm not sure if this would relate to the rest of PHP ecosystem, since there are already `const`/`define` keywords for ordinary constants and `readonly` for properties. Nonetheless, in my opinion, more concice syntax like `a = '...';` would promote usage of local constants instead of variables, which is generally better, being more stricter, though being a huge change to PHP as well. Best regards, Yevhen