説明
bool pspell_check(PSpell\Dictionary $dictionary, string $word)
pspell_check は単語のスペルをチェックします。
パラメータ
-
dictionary
-
PSpell\Dictionary クラスのインスタンス。
-
word
-
チェックする単語。
戻り値
スペルが正しい場合に true、そうでない場合に false を返します。
例
例1 pspell_check の例
<?php
$pspell = pspell_new("en");
if (pspell_check($pspell, "testt")) {
echo "This is a valid spelling";
} else {
echo "Sorry, wrong spelling";
}
?>