Category
stdlib
Problem
error_log(string $message, int $message_type = 0, ?string $destination = null, ?string $additional_headers = null): bool is not registered in ext/standard/Module.php. Application and library code uses it for diagnostics when exceptions are not appropriate. function_exists('error_log') is false under bin/vm.php (verified May 2026).
php-src reference
Repro (failure today)
<?php
if (!function_exists('error_log')) {
fwrite(STDERR, "MISSING: error_log\n");
exit(1);
}
error_log('hello from error_log');
echo "ok\n";
./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && php bin/vm.php repro.php'
# exit 1 — function missing
./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && php -r "var_dump(function_exists(\"error_log\"));"'
# bool(true) on Zend; bool(false) on this compiler
Scope
| Module |
Path |
| Registration |
ext/standard/Module.php |
| VM implementation |
ext/standard/error_log.php (new) |
| JIT/AOT |
ext/standard/JitErrorLog.php or host delegate |
| Tests |
test/compliance/cases/stdlib/error_log.phpt |
| Matrix |
script/capability-matrix.php |
Done when
Notes
Category
stdlibProblem
error_log(string $message, int $message_type = 0, ?string $destination = null, ?string $additional_headers = null): boolis not registered inext/standard/Module.php. Application and library code uses it for diagnostics when exceptions are not appropriate.function_exists('error_log')is false underbin/vm.php(verified May 2026).php-src reference
ext/standard/basic_functions.c—PHP_FUNCTION(error_log)main/SAPI.c—php_error_log()dispatch to syslog/file/SAPIRepro (failure today)
Scope
ext/standard/Module.phpext/standard/error_log.php(new)ext/standard/JitErrorLog.phpor host delegatetest/compliance/cases/stdlib/error_log.phptscript/capability-matrix.phpDone when
error_log($msg)writes to stderr or SAPI log (type0subset matching Zend on CLI)trueon success,falseon failure (invalid destination)docs/capabilities.md./script/ci-fast.sh --filter error_loggreenNotes
0(SAPI) and3(file append) are enough for compiler/stdlib self-host; syslog (1) optional follow-up.