Category
stdlib · php-src-strict
Problem
Two parity failures vs php-src ext/curl/interface.c:
function_exists('curl_escape') is true while extension_loaded('curl') is false — phantom partial curl surface (same class as grapheme_* without intl, Stdlib: grapheme_extract()/grapheme_substr()/grapheme_strpos() without ext/intl — function_exists true, Zend false (ext/intl/grapheme) #11803 ).
Wrong arity/signature : php-src curl_escape(CurlHandle $ch, string $str) (2 args); this compiler registers 1-arg curl_escape(string $str) in ext/curl/curl_escape.php.
When libcurl is available on the host, Zend requires a handle; VM accepts a bare string.
php-src reference
Repro (verified 2026-06-29)
test/repro/maintainer_gap_curl_escape_phantom_signature.php:
./script/docker-exec.sh -- bash -lc ' php test/repro/maintainer_gap_curl_escape_phantom_signature.php; echo ---; php bin/vm.php test/repro/maintainer_gap_curl_escape_phantom_signature.php'
Check
Zend (no ext/curl on reference profile)
VM
extension_loaded('curl')
false
false
function_exists('curl_escape')
false
true ❌
curl_escape($ch, 'a b') when curl loaded
a%20b
N/A (no curl_init)
curl_escape('a b') one-arg
ArgumentCountError
a%20b ❌
Scope (PHP-in-PHP first)
Layer
Path
Policy
ext/curl/CurlExtensionPolicy.php — gate escape helpers on extension_loaded('curl') like handle classes
Builtin
ext/curl/curl_escape.php, curl_unescape.php — adopt 2-arg php-src signature when #3325 lands
Registry
ext/curl/Module.php, ext/standard/Module.php — stop advertising curl helpers without extension
Tests
test/compliance/cases/stdlib/curl_escape_phantom.phpt
No new C runtime.
Done when (php-src-strict)
Related
Category
stdlib· php-src-strictProblem
Two parity failures vs php-src
ext/curl/interface.c:function_exists('curl_escape')is true whileextension_loaded('curl')is false — phantom partial curl surface (same class as grapheme_* without intl, Stdlib: grapheme_extract()/grapheme_substr()/grapheme_strpos() without ext/intl — function_exists true, Zend false (ext/intl/grapheme) #11803).curl_escape(CurlHandle $ch, string $str)(2 args); this compiler registers 1-argcurl_escape(string $str)inext/curl/curl_escape.php.When libcurl is available on the host, Zend requires a handle; VM accepts a bare string.
php-src reference
ext/curl/interface.c—PHP_FUNCTION(curl_escape),PHP_FUNCTION(curl_unescape)ext/curl/curl_arginfo.h— handle + string parametersRepro (verified 2026-06-29)
test/repro/maintainer_gap_curl_escape_phantom_signature.php:./script/docker-exec.sh -- bash -lc 'php test/repro/maintainer_gap_curl_escape_phantom_signature.php; echo ---; php bin/vm.php test/repro/maintainer_gap_curl_escape_phantom_signature.php'extension_loaded('curl')falsefalsefunction_exists('curl_escape')falsetrue❌curl_escape($ch, 'a b')when curl loadeda%20bcurl_escape('a b')one-argArgumentCountErrora%20b❌Scope (PHP-in-PHP first)
ext/curl/CurlExtensionPolicy.php— gate escape helpers onextension_loaded('curl')like handle classesext/curl/curl_escape.php,curl_unescape.php— adopt 2-arg php-src signature when #3325 landsext/curl/Module.php,ext/standard/Module.php— stop advertising curl helpers without extensiontest/compliance/cases/stdlib/curl_escape_phantom.phptNo new C runtime.
Done when (php-src-strict)
function_exists('curl_escape')is false (matches Zend)ArgumentCountErroron 1-arg callRelated