4 ms·
There is an error in the examples on this release page about traits with constants, it says that return self::CONSTANT; // Fatal error however that is actuall
by tored 4y ago
There is an error in the examples on this release page about traits with constants, it says that
return self::CONSTANT; // Fatal error
however that is actually allowed, what is an fatal error is
return Foo::CONSTANT; // Fatal error
compare
https://3v4l.org/dIeOk#v8.2rc7 https://3v4l.org/dIeOk#v8.2rc7
https://3v4l.org/11of1#v8.2rc7 https://3v4l.org/11of1#v8.2rc7
Prohibit direct access through a trait name
https://wiki.php.net/rfc/constants_in_traits https://wiki.php.net/rfc/constants_in_traits