diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2005-11-29 16:14:19 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2005-11-29 16:14:19 +0000 |
commit | 0242b892d2afdcd30ee22f3dcf13ec4cfa5b03e0 (patch) | |
tree | 17d61fc12b459c82099bb454cbf7321787059fef /ext/standard/tests/strings/str_word_count.phpt | |
parent | d61e8d63fd432f71ebf0edefcfeac34654456a0f (diff) | |
download | php-git-0242b892d2afdcd30ee22f3dcf13ec4cfa5b03e0.tar.gz |
Fixed bug #35427 (str_word_count() handles '-' incorrectly).
Diffstat (limited to 'ext/standard/tests/strings/str_word_count.phpt')
-rw-r--r-- | ext/standard/tests/strings/str_word_count.phpt | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/ext/standard/tests/strings/str_word_count.phpt b/ext/standard/tests/strings/str_word_count.phpt index 0c6c5ae566..9d41fc147b 100644 --- a/ext/standard/tests/strings/str_word_count.phpt +++ b/ext/standard/tests/strings/str_word_count.phpt @@ -36,7 +36,11 @@ var_dump(str_word_count($str2, 2, "014")); var_dump(str_word_count($str2, 2, array())); var_dump(str_word_count($str2, 2, new stdClass)); var_dump(str_word_count($str2, 2, "")); - +var_dump(str_word_count("foo'0 bar-0var", 2, "0")); +var_dump(str_word_count("'foo'", 2)); +var_dump(str_word_count("'foo'", 2, "'")); +var_dump(str_word_count("-foo-", 2)); +var_dump(str_word_count("-foo-", 2, "-")); ?> --EXPECTF-- array(6) { @@ -225,4 +229,26 @@ array(7) { string(3) "bar" [15]=> string(3) "foo" -}
\ No newline at end of file +} +array(2) { + [0]=> + string(5) "foo'0" + [6]=> + string(8) "bar-0var" +} +array(1) { + [1]=> + string(4) "foo'" +} +array(1) { + [0]=> + string(5) "'foo'" +} +array(1) { + [1]=> + string(3) "foo" +} +array(1) { + [0]=> + string(5) "-foo-" +} |