Syntax of strlen() function and Usage:
strlen(string)
string -> The fucntion returns the length of the input string including all the whitespaces and special characters.
$string="BAJARANGISOFT";
echo strlen($string);
<?php
$string="BAJARANGISOFT";
echo "<h4>".strlen($string). "</h4>";
echo "<h4>".strlen("BAJARANGISOFT"). "</h4>";
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>PHP string length function</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
</head>
<body>
<div class="container">
<div class="text-center">
<h1>PHP strlen() Function</h1>
</div>
<br>
<h2>The strlen() function return the length of the input string.</h2>
<div class="well">
<?php
$string="BAJARANGISOFT";
echo "<h4>".strlen($string). "</h4>";
echo "<h4>".strlen("BAJARANGISOFT"). "</h4>";
?>
</div>
<br>
</div>
</body>
</html>