PHP 5:
<?php // script is encoded in UTF-8
$str = "hallo daar!";
echo gettype($str), ': ', strlen($str), "\n";
$str = "привет!";
echo gettype($str), ': ', strlen($str), "\n";
?>
outputs:
string: 11
string: 13
PHP 6:
<?php // script is encoded in UTF-8
$str = "hallo daar!";
echo gettype($str), ': ', strlen($str), "\n";
$str = "привет!";
echo gettype($str), ': ', strlen($str), "\n";
?>
outputs:
unicode: 11
unicode: 7