public static function HasGifHeader( string $file, string $firstBytes = null ) : bool
   {

      if ( empty( $firstBytes ) )
      {
         $firstBytes = File::ReadFirstBytes( $file, 6 );
      }

      return (bool) \preg_match( '~^GIF\d~', $firstBytes );

   }
public static function HasGifHeader( string $file, string $firstBytes = null ) : bool
   {

      if ( empty( $firstBytes ) )
      {
         $firstBytes = File::ReadFirstBytes( $file, 6 );
      }

      return (bool) \preg_match( '~^GIF\d~', $firstBytes );

   }
public static function HasGifHeader ( string $ file , string $ firstBytes = null ) : bool { if ( empty ( $ firstBytes ) ) { $ firstBytes = File :: ReadFirstBytes ( $ file , 6 ) ; } return ( bool ) \ preg_match ( '~^GIF\d~' , $ firstBytes ) ; }
Returns if the defined file uses a valid GIF image file header.

@param  string $file
@param  string $firstBytes If defined it is used to get image info from.
@return boolean
Returns if the defined file uses a valid GIF image file header .