|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-08-04 14:00 UTC] jani@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Dec 01 17:00:01 2025 UTC |
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] => -- )