Perhaps better would be to introduce a function:

if (can_include($file)) {
   include $file;
}

opcode caches could easily snag this, as we could provide a simple hook the way we do with stream_resolve_path(). That would actually make a 0-stat smart autoloader a possibility. Just in case it isn't obvious, can_include() would be the equivalent to an include_path search followed by is_readable(), which is essentially what the fopen () hack does now. can_include() would also remove the unnecessary opening of the file that fopen() performs.

so you are suggesting that the byte code cache also cache file searches performed by this function. this is starting to sound more interesting from my pov.

regards
lukas

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to