Re: Re: SPLClassLoader RFC Thoughts And Improvements
| From: | Patrick ALLAERT | Date: | Fri, 11 Nov 2011 10:01:40 +0000 |
| Subject: | Re: Re: SPLClassLoader RFC Thoughts And Improvements | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-56275@lists.php.net to get a copy of this message | ||
2011/11/11 Anthony Ferrara <ircmaxell@gmail.com>:
[snip]
>> Actually they do not map the same file. Here is the path of each one:
>> new \Foo\Bar\Baz; => [path]/Foo/Bar/Baz.php
>> new \Foo\Bar_Baz; => [path]/Foo/Bar_Baz.php
>
> Well, as David pointed out, they do map to the same file. But even if
> they didn't, the following two classes would still map to the same
> file:
>
> \Foo\Bar
> \Foo_Bar
>
> The point is that multiple classes can map to the same file.
Yes, but even in that case the autoloader would not be triggered to
load \Foo_Bar because if you already have used \Foo\Bar previously,
that would have loaded \Foo_Bar as well.