Category
stdlib · php-src-strict · partial ext/bz2 parity
Problem
ext/bz2 pure-PHP bzcompress()/bzdecompress() register on PHP_COMPILER_PROFILE=8.4, but the stream-oriented API (bzopen, bzread, bzwrite, bzclose) is absent. Zend exposes the full set when ext/bz2 is loaded. Issue #3402 closed without stream helpers.
| Repro |
Zend 8.4 |
VM 8.4 profile (2026-07-07) |
function_exists('bzopen') |
true |
false |
function_exists('bzcompress') |
true |
true |
bzopen($tmp,'w') round-trip |
resource + write/read |
undefined function |
php-src reference
PHP implementation target
ext/bz2/ — stream resource type + bzopen/bzread/bzwrite/bzclose in PHP atop existing VmBz2Core compression primitives (PHP-in-PHP; no new C runtime logic)
ext/bz2/Module.php — register with CompilerVersion::supportsBz2() gate
lib/JIT/Builtin/ — optional phase-2 lowering after VM green
Repro
./script/docker-exec.sh -- bash -lc 'PHP_COMPILER_PROFILE=8.4 php bin/vm.php test/repro/maintainer_gap_bzopen_stream_api_84.php'
# Zend 8.4: ok · VM: fail: stream API missing on forward profile
Done when
Category
stdlib· php-src-strict · partial ext/bz2 parityProblem
ext/bz2pure-PHPbzcompress()/bzdecompress()register onPHP_COMPILER_PROFILE=8.4, but the stream-oriented API (bzopen,bzread,bzwrite,bzclose) is absent. Zend exposes the full set when ext/bz2 is loaded. Issue #3402 closed without stream helpers.function_exists('bzopen')truefalsefunction_exists('bzcompress')truetruebzopen($tmp,'w')round-tripphp-src reference
ext/bz2/bz2.c—php_bz2open,php_bz2read,php_bz2write,php_bz2closeext/bz2/php_bz2.h— stream wrapperPHP implementation target
ext/bz2/— stream resource type +bzopen/bzread/bzwrite/bzclosein PHP atop existingVmBz2Corecompression primitives (PHP-in-PHP; no new C runtime logic)ext/bz2/Module.php— register withCompilerVersion::supportsBz2()gatelib/JIT/Builtin/— optional phase-2 lowering after VM greenRepro
Done when
bzopen/bzread/bzwrite/bzclosecallable on VM whenPHP_COMPILER_PROFILE=8.4andextension_loaded('bz2').phptguard undertest/compliance/cases/stdlib/orext/bz2