PHP 8.3 added type declarations for class constants. const VERSION: string = '1.0.0'; rejects an integer at compile time. The same applies to enum cases and interface constants.
It closes a long-standing gap — until 8.3 a constant’s type was inferred from its value with no way to lock it down. Static analysers like PHPStan and Psalm already enforced this; now the runtime does too.
It also helps with refactors: if you change a constant’s type, subclasses fail to compile until they match.