This paper presents a fairly general version of the well-known Gleason–Kahane– \(\dot{\text {Z}}\) elazko (GKZ) theorem in the spirit of a GKZ type theorem obtained recently by Mashreghi and Ransford for Hardy spaces. In effect, we characterize a class of linear functionals as point evaluations on the vector space of all complex polynomials \(\mathcal {P}\) . We do not make any topological assumptions on \(\mathcal {P}\) . We then apply this characterization to present a version of the GKZ theorem for a vast class of topological spaces of complex-valued functions including the Hardy, Bergman, Dirichlet, and many more well-known function spaces. We obtain this result under the assumption of continuity of the linear functional, which we show, with the help of an example, to be a necessary condition for the desired conclusion. Lastly, we use the GKZ theorem for polynomials to obtain a version of the GKZ theorem for strictly cyclic weighted Hardy spaces.