Javatpoint Logo
Javatpoint Logo

PHP strlen() Function

The strlen() function is predefined function of PHP. It is used to find the length of string or returns the length of a string including all the whitespaces and special character.

Syntax:

Parameter Description Required/Optional
String Specify the string to check. Required.

Example 1

Output:

Your String is:Javatpoint
By using 'strlen()' function:10

Example 2

Output:

Your String is:Java T point
By using 'strlen()' function:12

Example 3

Output:

Your String is:P H P
By using 'strlen()' function:11

Reference:

http://php.net/manual/en/function.strlen.php

See Also:


Next TopicPHP String





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA