In 1993, P Rosenau and J M Hyman introduced and studied Korteweg–de-Vries-like equations with nonlinear dispersion admitting compacton solutions, , m, n > 1, which are known as the K(m, n) equations. In this paper we consider a slightly generalized version of the K(m, n) equations for m = n, namely, , where m, a, b are arbitrary real numbers. We describe all generalized symmetries and conservation laws thereof for m ≠ −2, −1/2, 0, 1; for these four exceptional values of m the equation in question is either completely integrable (m = −2, −1/2) or linear (m = 0, 1). It turns out that for m ≠ −2, −1/2, 0, 1 there are only three symmetries corresponding to x- and t-translations and scaling of t and u, and four non-trivial conservation laws, one of which expresses the conservation of energy, and the other three are associated with the Casimir functionals of the Hamiltonian operator admitted by our equation. Our result provides inter alia a rigorous proof of the fact that the K (2, 2) equation has just four conservation laws from the paper of P Rosenau and J M Hyman.