src/Keypair.php
public static function newFromMnemonic($mnemonic, $passphrase = '', $index = 0)
    {
        $bip39 = new Bip39();
        $seedBytes = $bip39->mnemonicToSeedBytesWithErrorChecking($mnemonic, $passphrase);

        $masterNode = HdNode::newMasterNode($seedBytes);

        $accountNode = $masterNode->derivePath(sprintf("m/44'/148'/%s'", $index));

        return static::newFromRawSeed($accountNode->getPrivateKeyBytes());
    }
public static function newFromMnemonic($mnemonic, $passphrase = '', $index = 0)
    {
        $bip39 = new Bip39();
        $seedBytes = $bip39->mnemonicToSeedBytesWithErrorChecking($mnemonic, $passphrase);

        $masterNode = HdNode::newMasterNode($seedBytes);

        $accountNode = $masterNode->derivePath(sprintf("m/44'/148'/%s'", $index));

        return static::newFromRawSeed($accountNode->getPrivateKeyBytes());
    }
Creates a new keypair from a mnemonic, passphrase (optional) and index (defaults to 0)

For more details, see https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0005.md

@param        $mnemonic
@param string $passphrase
@param int    $index
@return Keypair