Catalyzes the last irreversible step in the biosynthesis of L-serine from carbohydrates, the dephosphorylation of O-phospho-L- serine to L-serine (PubMed:12213811, PubMed:14673469, PubMed:15291819, PubMed:25080166, PubMed:9222972). L-serine can then be used in protein synthesis, to produce other amino acids, in nucleotide metabolism or in glutathione synthesis, or can be racemized to D-serine, a neuromodulator (PubMed:14673469). May also act on O-phospho-D-serine (Probable). {ECO:0000269|PubMed:12213811, ECO:0000269|PubMed:14673469, ECO:0000269|PubMed:15291819, ECO:0000269|PubMed:25080166, ECO:0000269|PubMed:9222972, ECO:0000303|PubMed:14673469, ECO:0000305|PubMed:1965857}. This is the function of Ensembl gene identifier ENSG00000146733 (PSPH, phosphoserine phosphatase).