Skip to content

Commit 8289ddd

Browse files
committed
hash: murmur: Fix test
Don't convert to numeric hash as it might overflow Signed-off-by: Anatol Belski <ab@php.net>
1 parent 44c9095 commit 8289ddd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ext/hash/tests/murmurhash3.phpt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ Hash: MurmurHash3 test
33
--FILE--
44
<?php
55

6-
$h = hash("murmur3a", "foo", true);
7-
echo ((ord($h[0]) << 24) | (ord($h[1]) << 16) | (ord($h[2]) << 8) | (ord($h[3]) << 0)), "\n";
6+
$h = hash("murmur3a", "foo");
7+
echo $h, "\n";
88

99
$h = hash("murmur3c", "Two hashes meet in a bar", false);
1010
echo $h, "\n";
@@ -39,7 +39,7 @@ echo $h0, " ", $h1, "\n";
3939

4040
?>
4141
--EXPECT--
42-
4138058784
42+
f6a5c420
4343
8036c2707453c6f37348142be7eaf75c
4444
c7009299985a5627a9280372a9280372
4545
40256ed26fa6ece7785092ed33c8b659

0 commit comments

Comments
 (0)