diff --git a/ext/standard/tests/strings/str_word_count.phpt b/ext/standard/tests/strings/str_word_count.phpt new file mode 100644 index 00000000000..4c9c0780f63 --- /dev/null +++ b/ext/standard/tests/strings/str_word_count.phpt @@ -0,0 +1,70 @@ +--TEST-- +str_word_count() +--FILE-- + +--EXPECTF-- +array(6) { + [0]=> + string(5) "Hello" + [1]=> + string(6) "friend" + [2]=> + string(6) "you're" + [3]=> + string(7) "looking" + [4]=> + string(4) "good" + [5]=> + string(5) "today" +} +array(6) { + [0]=> + string(5) "Hello" + [6]=> + string(6) "friend" + [14]=> + string(6) "you're" + [27]=> + string(7) "looking" + [44]=> + string(4) "good" + [49]=> + string(5) "today" +} +int(6) + +Warning: str_word_count(): The specified format parameter, '3' is invalid. in %s on line 9 +bool(false) + +Warning: str_word_count(): The specified format parameter, '123' is invalid. in %s on line 10 +bool(false) + +Warning: str_word_count(): The specified format parameter, '-1' is invalid. in %s on line 11 +bool(false) + +Warning: str_word_count(): The specified format parameter, '1569325056' is invalid. in %s on line 12 +bool(false) + +Warning: str_word_count(): The specified format parameter, '0' is invalid. in %s on line 13 +bool(false) + +Warning: str_word_count(): The specified format parameter, '0' is invalid. in %s on line 14 +bool(false) +string(55) "Hello friend, you're + looking good today!" \ No newline at end of file