1--TEST--
2Test iconv_strlen() function : basic functionality
3--EXTENSIONS--
4iconv
5--FILE--
6<?php
7/*
8 * Test basic functionality of iconv_strlen()
9 */
10
11echo "*** Testing iconv_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(iconv_strlen($string_ascii));
19
20echo "\n-- Multibyte String --\n";
21var_dump(iconv_strlen($string_mb, 'UTF-8'));
22?>
23--EXPECT--
24*** Testing iconv_strlen() : basic functionality***
25
26-- ASCII String --
27int(7)
28
29-- Multibyte String --
30int(21)
31