strlen() in php explanation code example Example: strlen php <?php echo strlen("Hello world!"); // will output 12 ?>