php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #44207 enchant_dict_check() used wrong in examples
Submitted: 2008-02-21 22:35 UTC Modified: 2008-11-07 11:39 UTC
From: mfischer@php.net Assigned:
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
 [2008-02-21 22:35 UTC] 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


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-11-07 11:39 UTC] vrana@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.


 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Thu Oct 08 05:00:01 2026 UTC