lastguest / murmurhash-php

PHP userland implementation of MurmurHash3
MIT License
128 stars 37 forks source link

Broken with PHP > 5 ? #3

Closed DontShootMe closed 9 years ago

DontShootMe commented 9 years ago

It seem to be broken with PHP > 5 Test case : ideone => PHP 5.6 codepad => PHP 5.2

DontShootMe commented 9 years ago

Finally not broken, but maybe a configuration where the result seem to be different ! I don't know why, where and how to look for this difference ! ! ! this is ok

lastguest commented 9 years ago

Seems like a problem with PHP on some 32bit systems. If integer operations overflow the PHP_INT_MAX value it will be converted to float ( http://php.net/manual/en/language.types.integer.php ) incurring on precision error.

I will look on a solution based on an arbitrary precision extension.

DontShootMe commented 9 years ago

yes it is ! I have found it ! but, too late . . . :-( this doesn’t help you . Many thanks.