In one script i founded a error from iconv_strlen() function. It try check utf8-len of string in cp1251.
$len = iconv_strlen($cp1252str, "utf-8");
I try use "utf-8//IGNORE" for mute error, but it do not work. Here is example with iconv (//IGNORE work) and iconv_strlen (//IGNORE not work)
<?php
$cp1252str = '';
for ($i = 128; $i < 256; $i++) {
$cp1252str .= chr($i);
}
iconv("cp1252", "utf-8//IGNORE", $cp1252str);
iconv_strlen($cp1252str, "utf-8//IGNORE");
Output:
PHP Notice: iconv_strlen(): Detected an illegal character in input string in /home/user/tmp/test.php on line 9 PHP Stack trace: PHP 1. {main}() /home/user/tmp/test.php:0 PHP 2. iconv_strlen() /home/user/tmp/test.php:9
How can i mute this error? Only with @?