count number of characters in a string in php

PHP
$str = 'abcdef';
echo strlen($str); // 6
Source

Also in PHP: