Le 13/10/2021 à 11:17, Guilliam Xavier a écrit :
Off-topic:
if ( class_exists('\\WeakMap') ) {
People should stop using a leading slash in FQCN *strings*. \Foo::class is
"Foo", not "\Foo". It might work generally but that's asking for problems
(e.g. for autoloaders).
(Sorry.)
And why not ? using the FQDN is 100% valid, autoloaders should take care
of this, not the end user.
For what it worth, I'm using both, depending upon context, both can make
sense.
Regards,
--
Pierre
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php