Category
stdlib | bootstrap
Problem
Zend exposes stream_resolve_include_path(string $filename): string|false to locate a file against the active include_path stack. This compiler reports function_exists('stream_resolve_include_path') → false, yet ext/standard/VmMetaTags.php already calls it — autoload/meta flows cannot resolve relative includes the way php-src does.
Distinct from #3223 (get_include_path / set_include_path stack); this issue is the lookup builtin itself.
php-src reference
Repro
./script/docker-exec.sh -- php bin/vm.php -r '
echo function_exists("stream_resolve_include_path") ? "yes" : "no", PHP_EOL;
set_include_path("/tmp");
var_export(stream_resolve_include_path("missing.php"));
'
Observed:
no
Call to undefined function stream_resolve_include_path()
Zend PHP expected: yes; returns absolute path when found, false when not.
Scope (this repo)
Done when
function_exists('stream_resolve_include_path') → true
- With
set_include_path('…'), resolves existing file to absolute path; missing file → false
- Enum case
$filename → TypeError (php-src-strict)
VmMetaTags path no longer calls undefined builtin
test/compliance/cases/stdlib/stream_resolve_include_path.phpt green on VM
./script/docker-exec.sh -- vendor/bin/phpunit --filter StreamResolveIncludePath
Links
Category
stdlib|bootstrapProblem
Zend exposes
stream_resolve_include_path(string $filename): string|falseto locate a file against the activeinclude_pathstack. This compiler reportsfunction_exists('stream_resolve_include_path')→ false, yetext/standard/VmMetaTags.phpalready calls it — autoload/meta flows cannot resolve relative includes the way php-src does.Distinct from #3223 (
get_include_path/set_include_pathstack); this issue is the lookup builtin itself.php-src reference
ext/standard/streams.c—PHP_FUNCTION(stream_resolve_include_path)main/php_open_temporary_file.c—php_resolve_path()search orderRepro
Observed:
Zend PHP expected:
yes; returns absolute path when found,falsewhen not.Scope (this repo)
ext/standard/stream_resolve_include_path.php+VmFs::resolveIncludePath()(share logic withinclude/requireresolution inlib/VM.php)runtime/Done when
function_exists('stream_resolve_include_path')→ trueset_include_path('…'), resolves existing file to absolute path; missing file →false$filename→TypeError(php-src-strict)VmMetaTagspath no longer calls undefined builtintest/compliance/cases/stdlib/stream_resolve_include_path.phptgreen on VM./script/docker-exec.sh -- vendor/bin/phpunit --filter StreamResolveIncludePathLinks