Php string

There are no artificial limits on string length - within the bounds of available memory, you ought to be able to make arbitrarily long strings.Strings that are delimited by double quotes (as in "this") are preprocessed in both.

Length of a String

The PHP strlen() function returns the length of a string.

Example :-

Result

12

Count The Number of Words in a String

The PHP str_word_count() function counts the number of words in a string.

Example :-

Result

2

Reverse a String

The PHP strrev() function reverses a string

Example

Result

!dlrow olleH

Replace Text Within a String

The PHP str_replace() function replaces some characters with some other characters in a string.

Example

Result

Hello Tutorial