$text = 'This is a test'; echo strlen($text); // 14 echo substr_count($text, 'is'); // 2