Category
stdlib · php-src-strict · ext/curl · signature parity (re-#13588)
Problem
#13588 gated curl_escape/curl_unescape on extension_loaded('curl'), but the arity/signature fix never landed. php-src requires curl_escape(CurlHandle $handle, string $string); this compiler still registers a 1-arg string-only API.
Verified 2026-07-18 on master (b6b30adbf) with curl advertised (extension_loaded('curl') true).
| Repro |
Zend / php-src |
VM (2026-07-18) |
curl_escape($ch, 'a b') |
'a%20b' |
ArgumentCountError (expects exactly 1 argument) |
curl_escape('a b') |
TypeError (CurlHandle required) |
'a%20b' (accepts phantom 1-arg) |
same for curl_unescape |
2-arg |
same 1-arg drift |
php-src reference
PHP implementation target
ext/curl/curl_escape.php, ext/curl/curl_unescape.php — require CurlHandle (or curl resource) as arg0; coerce string as arg1; keep encode/decode in VmCurlEscape (PHP-in-PHP)
- JIT paths in the same files — drop 1-arg
JitUrlencode shortcut arity
- No new
runtime/*.c logic
Repro
./script/docker-exec.sh -- bash -lc 'php bin/vm.php -r '\''$ch=curl_init(); try { var_export(curl_escape($ch, "a b")); } catch (Throwable $e) { echo get_class($e), ":", $e->getMessage(); }'\'''
Done when
Category
stdlib· php-src-strict · ext/curl · signature parity (re-#13588)Problem
#13588 gated
curl_escape/curl_unescapeonextension_loaded('curl'), but the arity/signature fix never landed. php-src requirescurl_escape(CurlHandle $handle, string $string); this compiler still registers a 1-arg string-only API.Verified 2026-07-18 on master (
b6b30adbf) with curl advertised (extension_loaded('curl')true).curl_escape($ch, 'a b')'a%20b'curl_escape('a b')'a%20b'(accepts phantom 1-arg)curl_unescapephp-src reference
ext/curl/interface.c—PHP_FUNCTION(curl_escape),PHP_FUNCTION(curl_unescape)ext/curl/curl.stub.php—curl_escape(CurlHandle $handle, string $string): string|falsePHP implementation target
ext/curl/curl_escape.php,ext/curl/curl_unescape.php— require CurlHandle (or curl resource) as arg0; coerce string as arg1; keep encode/decode inVmCurlEscape(PHP-in-PHP)JitUrlencodeshortcut arityruntime/*.clogicRepro
Done when
curl_escape($ch, 'a b')/curl_unescape($ch, 'a%20b')match Zend when curl is loadedcurl_escape('a b')TypeErrors like php-src (CurlHandle required).phptundertest/compliance/cases/curl/(or repro + unit)