Using PHP5 (cgi) to output template files from the filesystem and having issues spitting out raw HTML.
private function fetch($name) { $path = $this->
When working with faulty software it happens that the BOM part gets multiplied with every saving.
So I am using this to get rid of it.
function remove_utf8_bom($text) { $bom = pack('H*','EFBBBF'); while (preg_match("/^$bom/", $text)) { $text = preg_replace("/^$bom/", '', $text); } return $text; }