public static function is_base64(string $string) : bool
  {
    if (base64_encode(base64_decode($string, true)) === $string) return true;
    return false;
  }
public static function is_base64(string $string) : bool
  {
    if (base64_encode(base64_decode($string, true)) === $string) return true;
    return false;
  }
public static function is_base64 ( string $ string ) : bool { if ( base64_encode ( base64_decode ( $ string , true ) ) === $ string ) return true ; return false ; }
Check if string is base64 or not

@param string $string
@return bool
Check if string is base64 or not