Category
stdlib
Problem
HTTP client code and Composer HTTP discovery depend on ext/curl (curl_init, curl_setopt, curl_exec, …). This compiler has no curl builtins (function_exists('curl_init') → false), blocking parity with typical PHP deployments.
php-src reference
ext/curl/interface.c — PHP_FUNCTION(curl_init), curl_setopt, curl_exec, curl_getinfo, curl_error, curl_close
ext/curl/multi.c — curl_multi_* (phase 2)
ext/curl/curl_file.c — CURLFile for multipart (phase 2)
Repro (today)
./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && php bin/vm.php -r "var_export(function_exists(\"curl_init\"));"'
Zend (curl ext): true · This compiler: false
v1 behavior target
<?php
$ch = curl_init('https://example.com/');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_NOBODY, true);
$body = curl_exec($ch);
$code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo is_string($body) ? $code : 'fail';
Zend: HTTP status int (e.g. 200 or 404 depending on network). Document harness may use file:// or mock if CI must be offline.
Scope (this repo)
ext/curl/Module.php + VM handlers wrapping libcurl (or thin FFI to system libcurl in Docker image)
- Register resource type for curl handles in VM
- Constants:
CURLOPT_*, CURLINFO_* minimal subset for GET/POST
test/compliance/cases/stdlib/curl_init.phpt with @group network or local test server
Done when
Verification
./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && vendor/bin/phpunit --filter CurlInit'
Links
Category
stdlibProblem
HTTP client code and Composer HTTP discovery depend on ext/curl (
curl_init,curl_setopt,curl_exec, …). This compiler has no curl builtins (function_exists('curl_init')→ false), blocking parity with typical PHP deployments.php-src reference
ext/curl/interface.c—PHP_FUNCTION(curl_init),curl_setopt,curl_exec,curl_getinfo,curl_error,curl_closeext/curl/multi.c—curl_multi_*(phase 2)ext/curl/curl_file.c—CURLFilefor multipart (phase 2)Repro (today)
./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && php bin/vm.php -r "var_export(function_exists(\"curl_init\"));"'Zend (curl ext):
true· This compiler:falsev1 behavior target
Zend: HTTP status int (e.g.
200or404depending on network). Document harness may usefile://or mock if CI must be offline.Scope (this repo)
ext/curl/Module.php+ VM handlers wrapping libcurl (or thin FFI to system libcurl in Docker image)CURLOPT_*,CURLINFO_*minimal subset for GET/POSTtest/compliance/cases/stdlib/curl_init.phptwith@group networkor local test serverDone when
curl_init/curl_setopt/curl_exec/curl_getinfo/curl_error/curl_closework on VMdocs/capabilities.mdlists curl functionsVerification
./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && vendor/bin/phpunit --filter CurlInit'Links
get_headers()(different API) · Epic: Self-host critical path — compiler compiles itself (M3→M5) #1492