Category
Regression · php-src-strict · forward-profile phantom introspection
Problem
With PHP_COMPILER_PROFILE=8.4 on the 8.4.0-dev reference harness (Zend 8.2 semantics), several PHP 8.4-only symbols report present via function_exists() even though Zend 8.2 returns false. Issue #16086 closed the fpow/mb_str_pad/bcmath phantom path; http_get_last_response_headers() and stream_context_set_options() still leak through BuiltinIntrospectionPolicy / registration advertises helpers.
Probe (PHP_COMPILER_PROFILE=8.4) |
Zend 8.2 |
VM (2026-07-05) |
function_exists('http_get_last_response_headers') |
false |
true |
function_exists('http_clear_last_response_headers') |
false |
true |
function_exists('stream_context_set_options') |
false |
true |
function_exists('fpow') |
false |
false (OK post-#16086) |
php-src reference
PHP implementation target
ext/standard/BuiltinIntrospectionPolicy.php — route http/stream 8.4 symbols through advertises* helpers that return false on 8.4.0-dev reference (same pattern as advertisesFpow())
lib/CompilerVersion.php — add/adjust advertisesHttpResponseHeaders() / advertisesStreamContextSetOptions() if needed
- Keep symbols callable when both profile and php-src version allow; only fix introspection
Repro
./script/docker-exec.sh -- bash -lc '
PHP_COMPILER_PROFILE=8.4 php bin/vm.php test/repro/maintainer_gap_http_response_headers_phantom_reference.php
PHP_COMPILER_PROFILE=8.4 php bin/vm.php test/repro/maintainer_gap_stream_context_set_options_phantom_reference.php
'
Done when
Category
Regression· php-src-strict · forward-profile phantom introspectionProblem
With
PHP_COMPILER_PROFILE=8.4on the8.4.0-devreference harness (Zend 8.2 semantics), several PHP 8.4-only symbols report present viafunction_exists()even though Zend 8.2 returns false. Issue #16086 closed thefpow/mb_str_pad/bcmathphantom path;http_get_last_response_headers()andstream_context_set_options()still leak throughBuiltinIntrospectionPolicy/ registration advertises helpers.PHP_COMPILER_PROFILE=8.4)function_exists('http_get_last_response_headers')falsetruefunction_exists('http_clear_last_response_headers')falsetruefunction_exists('stream_context_set_options')falsetruefunction_exists('fpow')falsefalse(OK post-#16086)php-src reference
ext/standard/basic_functions.c—function_existsregistry / version gatesext/standard/streams.c—stream_context_set_options(PHP 8.4)ext/standard/http.c— response header helpers (PHP 8.4)PHP implementation target
ext/standard/BuiltinIntrospectionPolicy.php— route http/stream 8.4 symbols throughadvertises*helpers that return false on8.4.0-devreference (same pattern asadvertisesFpow())lib/CompilerVersion.php— add/adjustadvertisesHttpResponseHeaders()/advertisesStreamContextSetOptions()if neededRepro
Done when
ok(exit 0) withPHP_COMPILER_PROFILE=8.4against Zend 8.2 reference semanticstest/unit/ForwardProfilePhantomIntrospectionTest.php(or sibling)