#44207 [Opn->Ver]: enchant_dict_check() used wrong in examples

From: Date: Thu, 06 Nov 2008 08:20:28 +0000
Subject: #44207 [Opn->Ver]: enchant_dict_check() used wrong in examples
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-1398@lists.php.net to get a copy of this message
ID: 44207 Updated by: kalle@php.net Reported By: mfischer@php.net -Status: Open +Status: Verified Bug Type: Documentation problem PHP Version: Irrelevant Previous Comments: ------------------------------------------------------------------------ [2008-02-21 22:35:03] mfischer@php.net Description: ------------ enchant_dict_check() is document (and behaves) like this: bool enchant_dict_check ( resource $dict , string $word ) If the word is correctly spelled return TRUE, otherwise return FALSE However, the example on quite some pages seem to suggest that enchant_dict_check() once return an integer indicated some number of spelling errors. The result of enchant_dict_check() is used in an if($result), effectively preventing the example from actually working because on wrong spelled words the $result if false. The examples on these pages thus seem incorrect to me: http://php.net/manual/en/ref.enchant.php http://php.net/manual/en/function.enchant-dict-suggest.php ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=44207&edit=1

« previous php.doc.bugs (#1398) next »