Category
Regression · php-src-strict · PHP 8.4 null→TypeError · pillar 4
Problem
Under PHP_COMPILER_PROFILE=8.4, curl_escape($handle, null) and curl_unescape($handle, null) still coerce null → ''. Sibling URL encoder urlencode(null) already TypeErrors on the same profile. Signature/handle parity from #20493 is in place; forward null reject on $string is not.
| Repro |
Zend 8.4+ (forward) |
VM PROFILE=8.4 (2026-07-18) |
curl_escape(curl_init(), null) |
TypeError |
'' |
curl_unescape(curl_init(), null) |
TypeError |
'' |
control: urlencode(null) |
TypeError |
TypeError (OK) |
Host Zend 8.2 still coerces with deprecation — this ticket is forward 8.4 profile only.
php-src reference
PHP implementation target
Repro
./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && PHP_COMPILER_PROFILE=8.4 php bin/vm.php -r "
\$h = curl_init();
try { var_export(curl_escape(\$h, null)); echo \" COERCED\\n\"; }
catch (Throwable \$e) { echo get_class(\$e), \": \", \$e->getMessage(), \"\\n\"; }
try { var_export(curl_unescape(\$h, null)); echo \" COERCED\\n\"; }
catch (Throwable \$e) { echo get_class(\$e), \": \", \$e->getMessage(), \"\\n\"; }
"'
Done when
Category
Regression· php-src-strict · PHP 8.4 null→TypeError · pillar 4Problem
Under
PHP_COMPILER_PROFILE=8.4,curl_escape($handle, null)andcurl_unescape($handle, null)still coercenull→''. Sibling URL encoderurlencode(null)already TypeErrors on the same profile. Signature/handle parity from #20493 is in place; forward null reject on$stringis not.curl_escape(curl_init(), null)TypeError''curl_unescape(curl_init(), null)TypeError''urlencode(null)TypeErrorTypeError(OK)Host Zend 8.2 still coerces with deprecation — this ticket is forward 8.4 profile only.
php-src reference
ext/curl/interface.c—curl_escape/curl_unescapecurl_escape(CurlHandle $handle, string $string)— non-nullable$stringPHP implementation target
ext/curl/curl_escape.php/curl_unescape.php+VmCurlEscape— ensureJitStringBuiltinArg/ VM string coerce path rejects null on forward 8.4 profile (same as Regression: curl_escape()/curl_unescape() still 1-arg — php-src requires CurlHandle (re-#13588, ext/curl/interface.c) #20493 call sites)Repro
Done when
curl_escape/curl_unescapethrowTypeErroron null$stringunderPHP_COMPILER_PROFILE=8.4(VM + JIT + AOT).phptguard undertest/compliance/cases/curl/(ortest/repro/)