I am using iconv() to check if a string contains non-valid UTF-8 characters.
$valid = $string == iconv('UTF-8', 'UTF-8//IGNORE', $string);
However, this still throws the error: "iconv(): Detected an illegal character in input string"
To the best of my knowledge this should not be possible using the //IGNORE flag?
I'm using PHP 5.5.9-1ubuntu4.6 on Ubuntu 14.04.1 LTS