I'm combining my lament about lack of "you are using a variable you didn't declare yet" error in PHP and my newly arrived at understanding of the benefits of immutable variables, and then adding to the confusion by using the "constant/const" term, which typically means "set at compile time"
In languages with a compilation step, this is true but a side effect. Really, what "const" denotes is an association between a name and a value (ie a binding, in this case an assignment, although there are other kinds of binding such as naming positional arguments in a function signature) which has to be performed when the name is declared, and which cannot be changed once made. (Hence for example in Javascript why properties of an unsealed object can still be modified even via a const binding - what's immutable isn't the value, but the association of that value with the const-declared name.)