Re: Re: alternative to the fopen() hack in autoloaders
| From: | Mikko Koppanen | Date: | Wed, 11 Nov 2009 10:44:52 +0000 |
| Subject: | Re: Re: alternative to the fopen() hack in autoloaders | ||
| References: | 1 2 3 4 5 6 7 8 9 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-46025@lists.php.net to get a copy of this message | ||
On Wed, Nov 11, 2009 at 10:00 AM, Lukas Kahwe Smith <mls@pooteeweet.org> wrote:
>
> On 11.11.2009, at 01:50, Greg Beaver wrote:
>
>> if (can_include($file)) {
>> include $file;
>> }
>
>
> I am sure you focused on the technical aspects. Just wanted to say that for
> a name "can" is not ideal, because there is no gurantee that the file will
> not have syntax errors. As such something with "exists" is better (for
> example include_file_exists(), though also not ideal) .. Stas proposal of a
> "file_find()" is also good, but I think it would be nice to have "include"
> in the name.
>
Isn't this what stream_resolve_include_path does?
--
Mikko Koppanen