Catalyzes the hydrolysis of the 5-position phosphate of phosphatidylinositol 4,5-bisphosphate (PtdIns(4,5)P2) and phosphatidylinositol-3,4,5-bisphosphate (PtdIns(3,4,5)P3), with the greatest catalytic activity towards PtdIns(4,5)P2 (PubMed:10764818, PubMed:15474001, PubMed:7761412, PubMed:9430698). Also, is able to hydrolyze the 5-phosphate of inositol 1,4,5-trisphosphate and of inositol 1,3,4,5-tetrakisphosphate (PubMed:15474001, PubMed:40969890, PubMed:7761412). Regulates traffic in the endosomal pathway by regulating the specific pool of phosphatidylinositol 4,5-bisphosphate that is associated with endosomes (PubMed:21971085). Involved in primary cilia assembly (PubMed:22228094, PubMed:22543976). Acts as a regulator of phagocytosis, hydrolyzing PtdIns(4,5)P2 to promote phagosome closure, through attenuation of PI3K signaling (PubMed:22072788). {ECO:0000269|PubMed:10764818, ECO:0000269|PubMed:15474001, ECO:0000269|PubMed:21971085, ECO:0000269|PubMed:22072788, ECO:0000269|PubMed:22228094, ECO:0000269|PubMed:22543976, ECO:0000269|PubMed:25869668, ECO:0000269|PubMed:40969890, ECO:0000269|PubMed:7761412, ECO:0000269|PubMed:9430698}. This is the function of OCRL (OCRL inositol polyphosphate-5-phosphatase, Ensembl gene identifier ENSG00000122126).