Optical properties of p-type ZnO epilayers doped with different amounts of phosphorus by radio-frequency magnetron sputtering are investigated by x-ray diffraction, temperature dependent photoluminescence (PL), and time-resolved PL techniques. Bound exciton, free electrons-to-acceptors, donor-to-acceptor pair, and deep-level emissions are observed at about 3.356, 3.32, 3.24, and 2.4 eV at 10 K for p-type ZnO, respectively. The crystal quality and luminescence efficiency are improved with increasing phosphorus doping concentration. These results show that phosphorus doping plays an important role both in reducing native defects and in generating shallow acceptors in ZnO, leading to a good p-type conductivity in ZnO.