Rev 1116 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1116 | Rev 1130 | ||
---|---|---|---|
Line 53... | Line 53... | ||
53 | unset($res); |
53 | unset($res); |
54 | 54 | ||
55 | if ($cnt%25 == 0) echo "PROCESSING: $cnt \r"; |
55 | if ($cnt%25 == 0) echo "PROCESSING: $cnt \r"; |
56 | } |
56 | } |
57 | 57 | ||
- | 58 | /** |
|
- | 59 | * @param string $data |
|
- | 60 | * @return int |
|
- | 61 | */ |
|
58 | function smallhash($data) { // get 31 bits from SHA1. Values 0..2147483647 |
62 | function smallhash(string $data): int { // get 31 bits from SHA1. Values 0..2147483647 |
59 | return (hexdec(substr(sha1($data),-4*2)) & 0x7FFFFFFF); |
63 | return (hexdec(substr(sha1($data),-4*2)) & 0x7FFFFFFF); |
60 | } |
64 | } |
61 | 65 |