1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00
Files
archived-php-src/ext/hash/tests/xxh3_convert_secret_to_string.phpt

16 lines
399 B
PHP

--TEST--
xxh3 convert secret to string should not modify (shm) array
--FILE--
<?php
try {
hash_init("xxh3", options: $x = ["secret" => 4]);
} catch (Throwable) {}
var_dump($x);
?>
--EXPECTF--
Deprecated: hash_init(): Passing a secret of a type other than string is deprecated because it implicitly converts to a string, potentially hiding bugs in %s on line %d
array(1) {
["secret"]=>
int(4)
}