public function detect()
    {
        $str = file_get_contents($this->uri);

        foreach ($this->getBom('all') as $encoding => $bom) {
            if (0 === strncmp($str, $bom, strlen($bom))) {
                return $encoding;
            }
        }
    }
public function detect()
    {
        $str = file_get_contents($this->uri);

        foreach ($this->getBom('all') as $encoding => $bom) {
            if (0 === strncmp($str, $bom, strlen($bom))) {
                return $encoding;
            }
        }
    }
public function detect ( ) { $ str = file_get_contents ( $ this -> uri ) ; foreach ( $ this -> getBom ( 'all' ) as $ encoding => $ bom ) { if ( 0 === strncmp ( $ str , $ bom , strlen ( $ bom ) ) ) { return $ encoding ; } } }
Return the BOM if the file if it exists.
@return int|string
Return the BOM if the file if it exists .