pspell_check

単語をチェックする

説明

bool pspell_check(PSpell\Dictionary $dictionary, string $word)

pspell_check は単語のスペルをチェックします。

パラメータ

dictionary

PSpell\Dictionary クラスのインスタンス。

word

チェックする単語。

戻り値

スペルが正しい場合に true、そうでない場合に false を返します。

変更履歴

バージョン 説明
8.1.0 引数 dictionary は、PSpell\Dictionary クラスのインスタンスを期待するようになりました。 これより前のバージョンでは、リソース を期待していました。

例1 pspell_check の例

<?php
$pspell 
pspell_new("en");

if (
pspell_check($pspell"testt")) {
    echo 
"This is a valid spelling";
} else {
    echo 
"Sorry, wrong spelling";
}
?>