PHP strlen() & str_word_count() Functions

strlen(string) — This PHP function returns the length (number of characters) of a string as an integer value.

str_word_count(string) — This PHP function returns the number of words of a string as an integer value.

Try it here. Enter your string below:
e.g. An input of 'My had a little lamb.' will produce
21 for strlen() and 5 for str_word_count().


Function Result
Test String:
strlen() Result:
str_word_count() Result: