public function getBytesOffsetToSkipBOM($filePointer, $encoding)
    {
        $byteOffsetToSkipBom = 0;

        if ($this->hasBOM($filePointer, $encoding)) {
            $bomUsed = $this->supportedEncodingsWithBom[$encoding];

            // we skip the N first bytes
            $byteOffsetToSkipBom = strlen($bomUsed);
        }

        return $byteOffsetToSkipBom;
    }
public function getBytesOffsetToSkipBOM($filePointer, $encoding)
    {
        $byteOffsetToSkipBom = 0;

        if ($this->hasBOM($filePointer, $encoding)) {
            $bomUsed = $this->supportedEncodingsWithBom[$encoding];

            // we skip the N first bytes
            $byteOffsetToSkipBom = strlen($bomUsed);
        }

        return $byteOffsetToSkipBom;
    }
public function getBytesOffsetToSkipBOM ( $ filePointer , $ encoding ) { $ byteOffsetToSkipBom = 0 ; if ( $ this -> hasBOM ( $ filePointer , $ encoding ) ) { $ bomUsed = $ this -> supportedEncodingsWithBom [ $ encoding ] ; // we skip the N first bytes $ byteOffsetToSkipBom = strlen ( $ bomUsed ) ; } return $ byteOffsetToSkipBom ; }
Returns the number of bytes to use as offset in order to skip the BOM.

@param resource $filePointer Pointer to the file to check
@param string $encoding Encoding of the file to check
@return int Bytes offset to apply to skip the BOM (0 means no BOM)
Returns the number of bytes to use as offset in order to skip the BOM .