src/Lib/BloomFilter.php
protected function positions($value)
    {
        mt_srand(crc32($value));
        $positions = new SplFixedArray($this->k);
        for ($i = 0; $i < $this->k; $i++) {
            $positions[$i] = mt_rand(1, $this->m);
        }
        return $positions;
    }
protected function positions($value)
    {
        mt_srand(crc32($value));
        $positions = new SplFixedArray($this->k);
        for ($i = 0; $i < $this->k; $i++) {
            $positions[$i] = mt_rand(1, $this->m);
        }
        return $positions;
    }
protected function positions ( $ value ) { mt_srand ( crc32 ( $ value ) ) ; $ positions = new SplFixedArray ( $ this -> k ) ; for ( $ i = 0 ; $ i < $ this -> k ; $ i ++ ) { $ positions [ $ i ] = mt_rand ( 1 , $ this -> m ) ; } return $ positions ; }
Calculates the positions a value hashes to in the bitfield.

@param string $value The value to insert into the bitfield.
@return SplFixedArray Array containing the numeric positions in the bitfield.
Calculates the positions a value hashes to in the bitfield .