Re: alternative to the fopen() hack in autoloaders
| From: | Guilherme Blanco | Date: | Tue, 10 Nov 2009 17:00:34 +0000 |
| Subject: | Re: alternative to the fopen() hack in autoloaders | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-45993@lists.php.net to get a copy of this message | ||
include_silent is the name I though most intuitive once I finished to
read the RFC.
But it may not be the best too. It just need to be verbose.
Cheers,
On Tue, Nov 10, 2009 at 2:45 PM, Lukas Kahwe Smith <mls@pooteeweet.org> wrote:
> Ahoi,
>
> I have written an RFC for a more efficient solution to get rid of the common
> fopen() hack inside autoloaders:
> if ($fp = @fopen($file, 'r', true)) {
> fclose($fp);
> include $file;
> }
>
> Here is the gist of the proposal:
> In order to solve the above issues this RFC proposes the addition of a new
> construct/function for now called “autoload_include” for lack of a better
> name that largely behaves like the “include” does today with the following
> differences, that when the include failed because of a missing file no
> warning is raised and php null is returned.
>
> Further details can be found on the wiki:
> http://wiki.php.net/rfc/autoload_include
>
> As stated in the RFC, I am not happy with the name "autoload_include".
> Suggestions welcome!
>
> regards,
> Lukas Kahwe Smith
> mls@pooteeweet.org
>
>
>
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
Guilherme Blanco - Web Developer
CBC - Certified Bindows Consultant
Cell Phone: +55 (16) 9215-8480
MSN: guilhermeblanco@hotmail.com
URL: http://blog.bisna.com
São Paulo - SP/Brazil