Re: ::class wrong case
| From: | Stanislav Malyshev | Date: | Sun, 31 May 2015 21:30:51 +0000 |
| Subject: | Re: ::class wrong case | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-86463@lists.php.net to get a copy of this message | ||
Hi!
> That's annoying as I like to check the right class case on autoload to
> detect mistakes.
I'm not sure I understand this right, but if I do this sounds
contradictory. I.e., if you are trying to autoload the class, you
haven't loaded it yet. If you didn't, how would you know which case is
"right"?
> Are there any reasons to get the called case of the class instead or the
> original one?
The reason is that the former is constant fast operation while the
latter requires actually loading the class. Which is much more expensive.
--
Stas Malyshev
smalyshev@gmail.com