Category
Stdlib · php-src-strict · PROFILE≥8.4 · re-#19332 / #19112 / #21210 · sibling of #28689
Problem
Under PHP_COMPILER_PROFILE=8.4, zlib compressors still coerce null $data (Deprecated + empty-payload compressed bytes) instead of TypeError per Zend 8.4 stubs (string $data). Prior closed issues have regressed.
Verified 2026-08-07 on master @8232de4a23 (VM). Host reference is 8.2; done-when is php-src 8.4 TypeError.
| Call |
Zend 8.4+ |
VM PROFILE=8.4 (2026-08-07) |
gzcompress(null) |
TypeError |
Deprecated + zlib empty payload (789c030000000001) |
gzdeflate(null) |
TypeError |
Deprecated + empty deflate (0300) |
gzencode(null) |
TypeError |
Deprecated + gzip empty payload |
php-src reference
PHP implementation target
- PROFILE≥8.4 null→TypeError via shared string-arg guards in
ext/zlib (e.g. VmZlib) + VM/JIT — not new C in runtime/
Repro
./script/docker-exec.sh -- bash -lc 'PHP_COMPILER_PROFILE=8.4 php bin/vm.php /tmp/zlib_null84.php'
<?php
error_reporting(E_ALL);
foreach (['gzcompress','gzdeflate','gzencode'] as $f) {
try {
$r = $f(null);
echo "$f => ";
var_export(bin2hex($r));
echo "\n";
} catch (Throwable $e) {
echo "$f EX ", get_class($e), ':', $e->getMessage(), "\n";
}
}
Done when
Category
Stdlib· php-src-strict · PROFILE≥8.4 · re-#19332 / #19112 / #21210 · sibling of #28689Problem
Under
PHP_COMPILER_PROFILE=8.4, zlib compressors still coercenull$data(Deprecated + empty-payload compressed bytes) instead ofTypeErrorper Zend 8.4 stubs (string $data). Prior closed issues have regressed.Verified 2026-08-07 on master
@8232de4a23(VM). Host reference is 8.2; done-when is php-src 8.4 TypeError.gzcompress(null)TypeError789c030000000001)gzdeflate(null)TypeError0300)gzencode(null)TypeErrorphp-src reference
ext/zlib/zlib.stub.php—gzcompress/gzdeflate/gzencodestring $dataext/zlib/zlib.c— ZPPstringrejects null since 8.4PHP implementation target
ext/zlib(e.g.VmZlib) + VM/JIT — not new C inruntime/Repro
./script/docker-exec.sh -- bash -lc 'PHP_COMPILER_PROFILE=8.4 php bin/vm.php /tmp/zlib_null84.php'Done when
TypeErroronnull(VM + JIT; AOT if in scope).phptundertest/compliance/cases/stdlib/(or zlib/)