源码:
@header("content-Type: text/html; charset=utf-8");
$demon = 'www.php.cn';
$Chinese = 'PHP中文网';
echo strlen ($demon),'<hr>';
echo strlen($Chinese),'<hr>';
echo mb_strlen($demon),'<hr>';
echo mb_strlen($Chinese), '<hr>';
echo mb_strwidth($demon),'<hr>';
echo mb_strwidth($Chinese),'<hr>';
输出:
输出:
10
10
121012🎜