lastguest / murmurhash-php

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

Fatal error: Cannot redeclare zfsr() #1

Closed banks closed 9 years ago

banks commented 9 years ago

You can't declare a named function inside a function like that...

You either need to make it a lambda, move it outside the hash function body or wrap it with if(!function_exists('zfsr')).

What version of PHP did you test with? I'm intrigued to know how you never spotted that since it is always a fatal if you call hash more than once in a single script as far as I can see and this is top result on google for PHP murmur implementation....

lastguest commented 9 years ago

Whops... You are correct. I was developing in hhvm. Fixed that in e2645aed30945421ddae373b1dde6b6be3ac1113 , thanks. :)