static function isUtf8( $value ) {
$value = (string)$value;
- // Before PHP 5.4, values above U+10FFFF are incorrectly allowed, so we have to
- // check for them separately.
+ // HHVM 3.4 and older come with an outdated version of libmbfl that
+ // incorrectly allows values above U+10FFFF, so we have to check
+ // for them separately. (This issue also exists in PHP 5.3 and
+ // older, which are no longer supported.)
static $newPHP;
if ( $newPHP === null ) {
$newPHP = !mb_check_encoding( "\xf4\x90\x80\x80", 'UTF-8' );