#42207 [Opn->Bgs]: str_word_count() considers "-" single character as a word
| From: | jani@php.net | Date: | Sat, 04 Aug 2007 14:00:59 +0000 |
| Subject: | #42207 [Opn->Bgs]: str_word_count() considers "-" single character as a word | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-115744@lists.php.net to get a copy of this message | ||
ID: 42207
Updated by: jani@php.net
Reported By: marcelrcavalcante at yahoo dot com dot br
-Status: Open
+Status: Bogus
Bug Type: Strings related
Operating System: linux
PHP Version: 5.2.4RC1
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
Previous Comments:
------------------------------------------------------------------------
[2007-08-04 13:30:17] marcelrcavalcante at yahoo dot com dot br
Description:
------------
str_word_count() considers "-" single character as a word. Either the
itens "--", "---", "----" ...
Reproduce code:
---------------
$words = str_word_count("aaa - bbb-bb -- -ccc ---", 2);
print_r($words);
Expected result:
----------------
Array
(
[0] => aaa
[6] => bbb-bb
[16] => -ccc
)
Actual result:
--------------
Array
(
[0] => aaa
[4] => -
[6] => bbb-bb
[13] => --
[16] => -ccc
[21] => --
)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=42207&edit=1