Skip to content

Instantly share code, notes, and snippets.

@3D-I 3D-I/remove_bom.php
Last active Sep 14, 2019

What would you like to do?
// hexa code: EF BB BF
// displayed in browsers with:  - UTF8 files
static function remove_bom($str = '')
if (substr($str, 0, 3) == pack('CCC', 0xef, 0xbb, 0xbf))
$str = substr($str, 3);
return $str;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.