PHP Strlen Example | strlen() Function Tutorial is today’s topic. The strlen() function returns a length of the string. Returns a length of the string on success, and 0 if the string is empty. It takes a string as a parameter and returns its length. The strlen() function calculates a length of a string, including all the whitespaces and special characters.
See the following syntax of the strlen() function.
strlen(string)
The string parameter is required. Specifies the string to check.
<?php
$character = 'Dustin Henderson';
echo strlen($character);
#php #php strlen