Category
Regression · php-src-strict · PHP 8.4 null→TypeError
Problem
hash() / hash_hmac() still accept null for $data under PHP_COMPILER_PROFILE=8.4 (DEP + hash of empty string) instead of TypeError as Zend 8.4+. Not covered by open string-null batches (#28885/#28875/…).
Verified 2026-08-08 with PHP_COMPILER_PROFILE=8.4 php bin/vm.php.
| Repro |
Zend 8.4+ |
VM PROFILE=8.4 (2026-08-08) |
hash('sha1', null) |
TypeError |
DEP + da39a3ee5e6b4b0d3255bfef95601890afd80709 |
hash_hmac('sha1', null, 'k') |
TypeError |
DEP + hmac of "" |
php-src reference
PHP implementation target
- PROFILE≥8.4 null reject on hash
$data via shared string-arg guards in ext/hash / ext/standard PHP + JIT lowering; no new C runtime logic
Repro
PHP_COMPILER_PROFILE=8.4 ./script/docker-exec.sh -- bash -lc \
'php bin/vm.php test/repro/maintainer_gap_hash_null_typeerror_84.php'
Done when
Category
Regression· php-src-strict · PHP 8.4 null→TypeErrorProblem
hash()/hash_hmac()still acceptnullfor$dataunderPHP_COMPILER_PROFILE=8.4(DEP + hash of empty string) instead ofTypeErroras Zend 8.4+. Not covered by open string-null batches (#28885/#28875/…).Verified 2026-08-08 with
PHP_COMPILER_PROFILE=8.4 php bin/vm.php.hash('sha1', null)TypeErrorda39a3ee5e6b4b0d3255bfef95601890afd80709hash_hmac('sha1', null, 'k')TypeError""php-src reference
ext/hash/hash.stub.php—hash/hash_hmacstring $dataext/hash/hash.cPHP implementation target
$datavia shared string-arg guards inext/hash/ext/standardPHP + JIT lowering; no new C runtime logicRepro
PHP_COMPILER_PROFILE=8.4 ./script/docker-exec.sh -- bash -lc \ 'php bin/vm.php test/repro/maintainer_gap_hash_null_typeerror_84.php'Done when
hash('sha1', null)andhash_hmac('sha1', null, 'k')throwTypeErrorunder PROFILE=8.4/8.5