src/Derivation/Bip39/Bip39.php
protected function parseMnemonic($mnemonic)
    {
        $words = explode(' ', $mnemonic);
        if (count($words) %3 !== 0) throw new \InvalidArgumentException('Invalid mnemonic (number of words must be a multiple of 3)');

        $wordBitstrings = [];
        foreach ($words as $word) {
            $wordIdx = $this->getWordIndex($word);

            // Convert $wordIdx to an 11-bit number (preserving 0s)
            $wordBitstrings[] = str_pad(decbin($wordIdx), 11, '0', STR_PAD_LEFT);
        }

        // Return a string representing each bit
        return join('', $wordBitstrings);
    }
protected function parseMnemonic($mnemonic)
    {
        $words = explode(' ', $mnemonic);
        if (count($words) %3 !== 0) throw new \InvalidArgumentException('Invalid mnemonic (number of words must be a multiple of 3)');

        $wordBitstrings = [];
        foreach ($words as $word) {
            $wordIdx = $this->getWordIndex($word);

            // Convert $wordIdx to an 11-bit number (preserving 0s)
            $wordBitstrings[] = str_pad(decbin($wordIdx), 11, '0', STR_PAD_LEFT);
        }

        // Return a string representing each bit
        return join('', $wordBitstrings);
    }
Parses a string of words and returns a string representing the binary
encoding of the mnemonic (including checksum)

Note that this is a literal string of "101101110" and not raw bytes!

@param $mnemonic
@return string