Based on first-principles pseudopotential calculations, we investigated the electronic structure of various P-related defects in ZnO and the p-type doping efficiency for two forms of P dopant sources such as P2O5 and Zn3P2. As compared to N dopants, a substitutional P at an O site has a higher ionization energy of about 0.62 eV, which makes it difficult to achieve p-type ZnO. Under Zn-rich growth conditions, P-O acceptors are compensated by dominant donors such as P-Zn, leading to n-type conduction. Although a P-Zn-2V(Zn) complex, which consists of a substitutional P at a Zn antisite and two Zn vacancies, acts as an acceptor, the formation of Zn vacancies is more probable on going to O-rich conditions for the dopant source using P2O5. On the other hand, when Zn3P2 is used as the P dopant source, the P-Zn-2V(Zn) complex is energetically more favorable and becomes the dominant acceptor under O-rich growth conditions.