Hi!
I think stream_resolve_include_path() should be changed to work through
zend_resolve_path, in any case. Also, what is the reason it can't be in
5.3 too?
I'd like to both fix stream_resolve_include_path() and get it into 5.3,
any objections to that?
If that was done, only problem with using stream_resolve_include_path()
is this manner:
$realpath = stream_resolve_include_path($filename);
if ($realpath && is_readable($realpath)) {
include $realpath;
} else {
throw new Exception("What do you mean by $filename?");
}
This has disadvantage of using stat twice, but is_readable may be optional.
This however does not solve the problem fully - since include could fail
even though is_readable worked. But in that case I think it's OK for
autoload to fail too - if there's a file in the path that exists, it's
probably what you meant to include, so you probably don't want to try
another one instead - you want it to fail.
--
Stanislav Malyshev, Zend Software Architect
s...@zend.com http://www.zend.com/
(408)253-8829 MSN: s...@zend.com
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php