Hello Gregory, for include require we anyway use the streams stuff, don't we?
marcus Wednesday, March 5, 2008, 9:24:39 PM, you wrote: > Dmitry Stogov wrote: >> dmitry Wed Mar 5 13:34:16 2008 UTC >> >> Modified files: (Branch: PHP_5_3) >> /php-src NEWS >> /php-src/main fopen_wrappers.c fopen_wrappers.h main.c >> /ZendEngine2 zend.c zend.h zend_vm_def.h zend_vm_execute.h >> Log: >> Optimized require_once() and include_once() by eliminationg open() syscall >> on second usage. > Hi Dmitry, > This is a very nice addition - I wonder if you might be interested in a > patch to enable stream wrappers in include_path? There are a couple of > ways this could be done, but the one I think would be best is checking > for "//" immediately following ":" and then attempting to locate a > stream wrapper, and if not found then shunt to the current > realpath/fopen behavior. > I'm already implementing this kind of thing already inside pecl/phar, it > would be trivial to provide a patch and a few tests. > The only question is whether this would be better resolved by simply > intercepting zend_resolve_path inside pecl/phar, because include_path > scanning may be significantly slower if we have to check for all > possible stream wrappers and the requisite security checks for url-based > wrappers. Checking for phar is very efficient as I've currently > implemented it (have not yet committed, there are a few tests to be > written/details to perfect), and doesn't open the door for > shoot-yourself-in-the-foot security issues since all phar archives must > be local on-disk. > Thanks, > Greg Best regards, Marcus -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php