Back to PhocacartUtils class

Method removeUtf8Bom

public static
removeUtf8Bom
(mixed $text)

Method removeUtf8Bom - Source code

public static function removeUtf8Bom($text)
{
    $bom = pack('H*', 'EFBBBF');
    $text = preg_replace("/^{$bom}/", '', $text);
    return $text;
}