In #P_4# the electron density is shared equally between all of the atoms of Phosphorus leaving all them with zero oxidation state.
In # HPO_2# Phosphorus has a charge of +3
# H = 1 xx H = 1 xx + 1 = +1#
# O_2 = 2 xx O = 2 xx -2 = -4 #
# +1 + P + -4 = 0# ( a compound always = 0)
# P +1 -4 = 0#
# P - 3 = 0 # adding 3 to both sides gives
# P = +3 #
In # Li_3PO_3# P has a charge of +3
# Li_3 = 3 xx Li = 3 xx + 1 = +3#
# O_3 = 3 xx O = 3 xx -2 = -6 #
# +3 + P + (-6) = 0 #
# P + 3 -6 = 0#
# P - 3 = 0# adding 3 to both sides gives
# P = +3 #
In # H_3 P O_4# P has a charge of +5
# H_3 = 3 xx H = 3 xx +1 = +3 #
# O_4 = 4 xx O = 4 xx -2 = -8 #
# + 3 + P + (-8) = 0#
# P + 3 -8 = 0 #
# P -5 = 0 # adding five to both sides gives
# P = +5#
in # PH_3# P = -3
# H_3 = 3 xx H = 3 xx +1 = +3# so
# P + 3 = 0 # subtract 3 from both sides gives
# P = -3 #
All the other compounds give species of phosphorus that have non-zero oxidation state.Only phosphorus in elemental phosphorus has zero oxidation state .