Re: alternative to the fopen() hack in autoloaders
| From: | Stanislav Malyshev | Date: | Tue, 10 Nov 2009 18:49:28 +0000 |
| Subject: | Re: alternative to the fopen() hack in autoloaders | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-46002@lists.php.net to get a copy of this message | ||
Hi!
Maybe it'd be easier to just add parameter to file_exists that allows it to use include_path? I think that's at least what ZF is trying to do with that fopen - it tries to find out if such file exists in the path and if so - include it. I don't think you need to create special language construct for that - you can shut off warning with @. -- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.comIn 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.