The functional variable method is a powerful solution method for obtaining exact solutions of some nonlinear partial differential equations. In this paper, the functional variable method is used to establish exact solutions of the generalized forms of Klein–Gordon equation, the (2 + 1)-dimensional Camassa–Holm Kadomtsev–Petviashvili equation and the higher-order nonlinear Schrödinger equation. By using this useful method, we found some exact solutions of the above-mentioned equations. The obtained solutions include solitary wave solutions, periodic wave solutions and combined formal solutions. It is shown that the proposed method is effective and general.