Hi,

I have noted that detecting a class name using "::class" it will return the called case instead of the original case.
see http://3v4l.org/97K36

That's annoying as I like to check the right class case on autoload to detect mistakes.

Sure, class names in PHP are case-insensitive but filesystems aren't and most autoloader using the FS to find the right file. To catch such kind of mistakes I would like to implement a fast check in my autoloader to get noted on development instead on production. It's currently only possible with ReflectionClass but this will be much slower as with ::class.

Are there any reasons to get the called case of the class instead or the original one?

Marc

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to