- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
strlen() function in PHP
The strlen() function is used to get the string length. It returns the length of the string on success. If the string is empty, 0 is returned.
Syntax
strlen(str)
Parameters
str − The string for which we want the length.
Return
The strlen() function returns the length of the string on success. If the string is empty, 0 is returned.
Example
The following is an example −
<?php echo strlen("Tom Hanks!"); ?>
Output
The following is the output −
10
Advertisements