PHP Implementation of MurmurHash3
More information about these algorithms can be found at:
Porting of the MurmurHash3 JavaScript version created by Gary Court (https://github.com/garycourt/murmurhash-js)
Use composer :
composer require lastguest/murmurhashYou can retrieve an hash via hash3 static method of class Murmur
<?php
use lastguest\Murmur;
echo Murmur::hash3("Hello World");
// cnd0ueYou can pass a precise seed positive integer as second parameter
<?php
use lastguest\Murmur;
echo Murmur::hash3("Hello World", 1234567);
// qtq2uIf you need the integer hash, use the hash3_int method
<?php
use lastguest\Murmur;
echo Murmur::hash3_int("Hello World");
// 427197390