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