summaryrefslogtreecommitdiff
path: root/Zend/tests/array_hash_zero.phpt
blob: 0939d5bf12035d8ee13571285a900047563c3698 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--TEST--
Accept hashes being equal to zero
--FILE--
<?php

$hashes = [
    "\x8e\x1a\x63\x0f\x61" => 32,
    "\xf7\x17\x7f\x7f\x7f\x7f\x7f\x7f\x7f\x6b\x03\x6a\x13\x63\x17\x6b\x1d\x67" => 64,
];

foreach ($hashes as $hash => $bits) {
    var_dump($hashes[$hash], $bits);
}

?>
--EXPECT--
int(32)
int(32)
int(64)
int(64)