A Tychonoff space X is called a P-space if M p = O p for each p ∈ βX. For a subring R of C(X), we call X an R-P-space, if M p ∩ R = O p ∩ R for each p ∈ βX. Various characterizations of R-P-spaces are investigated some of which follows from constructing the smallest invertible subring of C(X) in which R is embedded, S −1 R R. Moreover, we study R-P-spaces when R is an intermediate ring or an intermediate C-ring. We follow a new approach to some results of [W. Murray, J. Sack and S. Watson, P-spaces and intermediate rings of continuous functions, Rocky Mount. J. Math., to appear]. Also, some algebraic characterizations of P-spaces via intermediate rings are given. Finally, we establish some characterizations of C(X) among intermediate C-rings which are of the form I + C * (X), where I is an ideal in C(X).