1--TEST-- 2Test mb_strlen() function : basic functionality 3--EXTENSIONS-- 4mbstring 5--FILE-- 6<?php 7/* 8 * Test basic functionality of mb_strlen() 9 */ 10 11echo "*** Testing mb_strlen() : basic functionality***\n"; 12 13$string_ascii = 'abc def'; 14//Japanese string in UTF-8 15$string_mb = base64_decode('5pel5pys6Kqe44OG44Kt44K544OI44Gn44GZ44CCMDEyMzTvvJXvvJbvvJfvvJjvvJnjgII='); 16 17echo "\n-- ASCII String --\n"; 18var_dump(mb_strlen($string_ascii)); 19 20echo "\n-- Multibyte String --\n"; 21var_dump(mb_strlen($string_mb, 'UTF-8')); 22 23echo "\nDone"; 24?> 25--EXPECT-- 26*** Testing mb_strlen() : basic functionality*** 27 28-- ASCII String -- 29int(7) 30 31-- Multibyte String -- 32int(21) 33 34Done 35