zlacker

[parent] [thread] 0 comments
1. tored+(OP)[view] [source] 2022-12-08 12:53:54
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/11of1#v8.2rc7

Prohibit direct access through a trait name

https://wiki.php.net/rfc/constants_in_traits

[go to top]