

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- 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
- Related Questions & Answers
- strlen() php function giving the wrong length of unicode characters ?
- What is strlen function in C language?
- Write a C program demonstrating strlen library function
- file_exists() function in PHP
- basename( ) function in PHP
- chgrp()function in PHP
- chmod() function in PHP
- chown() function in PHP
- clearstatcache() function in PHP
- copy() function in PHP
- delete() function in PHP
- dirname()function in PHP
- disk_free_space() function in PHP
- disk_total_space() function in PHP
- diskfreespace() function in PHP
Advertisements