Category
bug · php-src-strict · Reflection return type · ext/hash
Problem
hash_algos() Reflection advertises array return, but sibling hash_hmac_algos() has no return type (ReflectionFunction::hasReturnType() === false). Zend stub is function hash_hmac_algos(): array. Probed 2026-08-06 VM @ bf5802236.
| Function |
Zend Reflection return |
VM (2026-08-06) |
hash_algos |
array |
array |
hash_hmac_algos |
array |
<none> |
Runtime list itself is fine (non-empty HMAC algo list).
php-src reference
PHP implementation target
ext/hash/ Module / Internal arginfo for hash_hmac_algos — add array return metadata to match hash_algos; PHP-only, no C
Repro
./script/docker-exec.sh -- bash -lc 'php bin/vm.php -r '\''
$r = new ReflectionFunction("hash_hmac_algos");
echo "hmac return=", $r->hasReturnType() ? (string)$r->getReturnType() : "NONE", "\n";
$r2 = new ReflectionFunction("hash_algos");
echo "algos return=", $r2->hasReturnType() ? (string)$r2->getReturnType() : "NONE", "\n";
'\'''
Done when
Category
bug· php-src-strict · Reflection return type · ext/hashProblem
hash_algos()Reflection advertisesarrayreturn, but siblinghash_hmac_algos()has no return type (ReflectionFunction::hasReturnType() === false). Zend stub isfunction hash_hmac_algos(): array. Probed 2026-08-06 VM @bf5802236.hash_algosarrayarrayhash_hmac_algosarrayRuntime list itself is fine (non-empty HMAC algo list).
php-src reference
ext/hash/hash.stub.php—function hash_hmac_algos(): array {}PHP implementation target
ext/hash/Module / Internal arginfo forhash_hmac_algos— addarrayreturn metadata to matchhash_algos; PHP-only, no CRepro
Done when
ReflectionFunction('hash_hmac_algos')->getReturnType()isarray(matcheshash_algos/ Zend).phptguard undertest/compliance/cases/