新版本的变更 / PHP 8.3

// *** before: ***
interface HasStatus {
    // nothing stops an implementing class from using the wrong type
    const STATUS_ACTIVE = 'active';
}

// *** in version 8.3: ***
interface HasStatus {
    const string STATUS_ACTIVE = 'active';
}

class Account implements HasStatus {
    // overriding the constant with the wrong type is now a compile-time
    // error, not a mystery discovered at runtime
    const string STATUS_ACTIVE = 'active';
}