Constants Are Mutable

no-email (Damien Seguy), Damien Seguy
Mon, 02 Oct 2023 00:00:00 +0000

Since PHP 8.2, it is possible to use an object with a constant: this is the new initializer feature.
With a object in a constant, it is still possible to call methods or properties, and mutate the constants. Indeed, the constant is still representing the same object, but the properties in the objects are not constants.