# stream_resolve_include_path improvement

- Thread: https://externals.io/message/48669
- Original archive: https://news-web.php.net/php.internals/48669
- Started by Jordi Boggiano on 2010-06-07T14:29:00+00:00
- Messages: 1
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · RFCs at https://externals.io/rfc.md · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #48669 — Jordi Boggiano — 2010-06-07T14:29:00+00:00

URL: https://externals.io/message/48669#48669

Heya,

stream_resolve_include_path [1] was introduced mostly to build framework
autoloaders. Good. It's great as it is. However it still forces the
framework to stash all its paths in the global include_path so that
they're picked up by that function.

Wouldn't it make sense to have an option, either via a third argument to
it, or as part of the context options maybe, to allow people to pass
their local include_path ?

That would mean one can ask php to resolve the path for file a.php
within array('/foo', '/bar'), without the need to alter the include_path
at all.

I'm thinking it could be handy for libs, but maybe I'm overlooking
something, is it already possible? Does it even makes sense
performance-wise?

Cheers

[1] http://ch2.php.net/stream_resolve_include_path

-- 
Jordi Boggiano
@seldaek :: http://seld.be/
