RosettaCodeData/Task/String-length/PHP/string-length-2.php

2 lines
71 B
PHP

$length = mb_strlen('Hello, world!', 'UTF-8'); // or whatever encoding