Re: [PHP-DEV] Re: alternative to the fopen() hack in autoloaders

2009-11-11 Thread Stanislav Malyshev
Hi! Isn't this what stream_resolve_include_path does? I wasn't even aware it was there (it being undocumented doesn't help a lot). And it is listed as PHP 6 only. I guess if we fix it to work correctly and backport to 5.3 (or even 5.2?) it may just work for frameworks. -- Stanislav Malyshe

Re: [PHP-DEV] Re: alternative to the fopen() hack in autoloaders

2009-11-11 Thread Lukas Kahwe Smith
On 11.11.2009, at 14:50, Greg Beaver wrote: Lukas Kahwe Smith wrote: On 11.11.2009, at 11:44, Mikko Koppanen wrote: On Wed, Nov 11, 2009 at 10:00 AM, Lukas Kahwe Smith so a byte code cache should cache the resolution of the path thereby speeding up the subsequent call to include? strea

Re: [PHP-DEV] Re: alternative to the fopen() hack in autoloaders

2009-11-11 Thread Greg Beaver
Lukas Kahwe Smith wrote: > > On 11.11.2009, at 11:44, Mikko Koppanen wrote: > >> On Wed, Nov 11, 2009 at 10:00 AM, Lukas Kahwe Smith >> wrote: >>> >>> On 11.11.2009, at 01:50, Greg Beaver wrote: >>> if (can_include($file)) { include $file; } >>> >>> >>> I am sure you focused on th

Re: [PHP-DEV] Re: alternative to the fopen() hack in autoloaders

2009-11-11 Thread Lukas Kahwe Smith
On 11.11.2009, at 11:44, Mikko Koppanen wrote: On Wed, Nov 11, 2009 at 10:00 AM, Lukas Kahwe Smith > 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" i

Re: [PHP-DEV] Re: alternative to the fopen() hack in autoloaders

2009-11-11 Thread Mikko Koppanen
On Wed, Nov 11, 2009 at 10:00 AM, Lukas Kahwe Smith 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 gura

Re: [PHP-DEV] Re: alternative to the fopen() hack in autoloaders

2009-11-11 Thread Lukas Kahwe Smith
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

Re: [PHP-DEV] Re: alternative to the fopen() hack in autoloaders

2009-11-11 Thread Lukas Kahwe Smith
On 11.11.2009, at 10:47, Richard Quadling wrote: 2009/11/11 Lukas Kahwe Smith : [snip] Would using a userland-based set_error_handler() be of use here? If, under normal circumstances, blind include() is what is used, then trapping the error when it fails would be when you could test for wha

Re: [PHP-DEV] Re: alternative to the fopen() hack in autoloaders

2009-11-11 Thread Richard Quadling
2009/11/11 Lukas Kahwe Smith : > [snip] Would using a userland-based set_error_handler() be of use here? If, under normal circumstances, blind include() is what is used, then trapping the error when it fails would be when you could test for whatever it is you want to test for? Richard. -- --