src/Abstracts/AbstractDefaultHandler.php
public function stripBom( $body )
    {
        if ( substr( $body, 0, 3 ) === "\xef\xbb\xbf" )  // UTF-8
        {
            $body = substr( $body, 3 );
        } else {
            if ( substr( $body, 0, 4 ) === "\xff\xfe\x00\x00" || substr( $body, 0, 4 ) === "\x00\x00\xfe\xff" )  // UTF-32
            {
                $body = substr( $body, 4 );
            } else {
                if ( substr( $body, 0, 2 ) === "\xff\xfe" || substr( $body, 0, 2 ) === "\xfe\xff" )  // UTF-16
                {
                    $body = substr( $body, 2 );
                }
            }
        }

        return $body;
    }
public function stripBom( $body )
    {
        if ( substr( $body, 0, 3 ) === "\xef\xbb\xbf" )  // UTF-8
        {
            $body = substr( $body, 3 );
        } else {
            if ( substr( $body, 0, 4 ) === "\xff\xfe\x00\x00" || substr( $body, 0, 4 ) === "\x00\x00\xfe\xff" )  // UTF-32
            {
                $body = substr( $body, 4 );
            } else {
                if ( substr( $body, 0, 2 ) === "\xff\xfe" || substr( $body, 0, 2 ) === "\xfe\xff" )  // UTF-16
                {
                    $body = substr( $body, 2 );
                }
            }
        }

        return $body;
    }
public function stripBom ( $ body ) { if ( substr ( $ body , 0 , 3 ) === "\xef\xbb\xbf" ) // UTF-8 { $ body = substr ( $ body , 3 ) ; } else { if ( substr ( $ body , 0 , 4 ) === "\xff\xfe\x00\x00" || substr ( $ body , 0 , 4 ) === "\x00\x00\xfe\xff" ) // UTF-32 { $ body = substr ( $ body , 4 ) ; } else { if ( substr ( $ body , 0 , 2 ) === "\xff\xfe" || substr ( $ body , 0 , 2 ) === "\xfe\xff" ) // UTF-16 { $ body = substr ( $ body , 2 ) ; } } } return $ body ; }
Remove null byte from body

@param $body

@return string
Remove null byte from body