Category
stdlib · php-src-strict · extension advertisement
Problem
CurlExtensionPolicy::advertisesExtension() returns VmCurlNative::available() (libcurl FFI present). On php-compiler:22.04-dev, Zend does not load ext/curl, but the VM still reports the module and curl_init because FFI is available — introspection must follow Zend module registration, not host library presence (#23857 pattern; curl policy comments already warn about phantom class_exists).
| Probe (2026-07-27, docker) |
Zend 8.2 |
VM |
extension_loaded('curl') |
false |
true |
function_exists('curl_init') |
false |
true |
php-src reference
PHP implementation target
ext/curl/CurlExtensionPolicy.php — gate advertisement to match Zend’s loaded-module set on the reference profile (not “libcurl FFI exists”)
ext/standard/BuiltinIntrospectionPolicy.php — curl branch already special-cased; keep consistent
- Keep in-tree curl implementations for builds that intentionally enable the module; PHP-in-PHP only
Repro
./script/docker-exec.sh -- bash -lc 'php -r "var_export(extension_loaded(\"curl\")); echo PHP_EOL; var_export(function_exists(\"curl_init\")); echo PHP_EOL;"'
./script/docker-exec.sh -- bash -lc 'php bin/vm.php -r "var_export(extension_loaded(\"curl\")); echo PHP_EOL; var_export(function_exists(\"curl_init\")); echo PHP_EOL;"'
Done when
Category
stdlib· php-src-strict · extension advertisementProblem
CurlExtensionPolicy::advertisesExtension()returnsVmCurlNative::available()(libcurl FFI present). Onphp-compiler:22.04-dev, Zend does not loadext/curl, but the VM still reports the module andcurl_initbecause FFI is available — introspection must follow Zend module registration, not host library presence (#23857 pattern; curl policy comments already warn about phantomclass_exists).extension_loaded('curl')falsetruefunction_exists('curl_init')falsetruephp-src reference
ext/curl/interface.c— module init /curl_initext/standard/basic_functions.c—extension_loaded()PHP implementation target
ext/curl/CurlExtensionPolicy.php— gate advertisement to match Zend’s loaded-module set on the reference profile (not “libcurl FFI exists”)ext/standard/BuiltinIntrospectionPolicy.php— curl branch already special-cased; keep consistentRepro
Done when
curl_initadvertisement matches ZendCurlExtensionPolicyTest/ phantom guards updated for the harness case