[php-src] PR #24412: ext/hash: don't emit xxh64 seed deprecation when no seed is given
| From: | jorgsowa | Date: | Sun, 18 Oct 2026 15:40:08 +0000 |
| Subject: | [php-src] PR #24412: ext/hash: don't emit xxh64 seed deprecation when no seed is given | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-39560@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/24412
Author: jorgsowa
PHP_XXH64Init() emits the "Passing a seed of a type other than int is
deprecated" notice whenever an options array is passed, even if it has no seed
key:
```php
hash("xxh64", "x", false, []);
// Deprecated: hash(): Passing a seed of a type other than int is deprecated because it is the same
as setting the seed to 0
```
xxh32, xxh3 and xxh128 don't do this. The xxh64 check was if (seed && IS_LONG ==
Z_TYPE_P(seed)) … else deprecate, so a missing seed fell into the else branch. This PR
nests the check the same way as in PHP_XXH32Init().
Introduced in #15236 (74eff98c84b26a8088fb56b5be748a3e0e1da419), so 8.4 is the first affected
version.