The phosphorus containing organic compounds are detected by 'Lassaigne's test' by heated with an oxidizing agent (sodium peroxide). The phosphorus present in the compound is oxidised to phosphate.
The solution is boiled with nitric acid and then treated with ammonium molybdate to produced canary yellow precipitate.
Phosphorus gets oxidised when it is treated with fuming conc. HNO3.
Na3PO4+3HNO3→H3PO4+3NaNO3
Phosphoric acid is used along with molybdenum compound for the identification of Magnesium.