ID: 42207 Updated by: [EMAIL PROTECTED] 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