find number of characters in word php

PHP
$name = "Perú"; // With accent mark
echo strlen($name); // Display 5, because "ú" require 2 bytes.

$name = "Peru"; // Without accent mark
echo strlen($name); // Display 4$str = 'abcdef';
echo strlen($str); // 6
Source

Also in PHP: