Non-receptor type tyrosine-specific phosphatase that dephosphorylates receptor protein tyrosine kinases including INSR, EGFR, CSF1R, PDGFR. Also dephosphorylates non-receptor protein tyrosine kinases like JAK1, JAK2, JAK3, Src family kinases, STAT1, STAT3 and STAT6 either in the nucleus or the cytoplasm. Negatively regulates numerous signaling pathways and biological processes like hematopoiesis, inflammatory response, cell proliferation and differentiation, and glucose homeostasis. Plays a multifaceted and important role in the development of the immune system. Functions in T- cell receptor signaling through dephosphorylation of FYN and LCK to control T-cells differentiation and activation. Dephosphorylates CSF1R, negatively regulating its downstream signaling and macrophage differentiation. Negatively regulates cytokine (IL2/interleukin-2 and interferon)-mediated signaling through dephosphorylation of the cytoplasmic kinases JAK1, JAK3 and their substrate STAT1, that propagate signaling downstream of the cytokine receptors. Also regulates the IL6/interleukin-6 and IL4/interleukin-4 cytokine signaling through dephosphorylation of STAT3 and STAT6 respectively. In addition to the immune system, it is involved in anchorage-dependent, negative regulation of EGF-stimulated cell growth. Activated by the integrin ITGA1/ITGB1, it dephosphorylates EGFR and negatively regulates EGF signaling. Dephosphorylates PDGFRB and negatively regulates platelet-derived growth factor receptor-beta signaling pathway and therefore cell proliferation. Negatively regulates tumor necrosis factor-mediated signaling downstream via MAPK through SRC dephosphorylation. May also regulate the hepatocyte growth factor receptor signaling pathway through dephosphorylation of the hepatocyte growth factor receptor MET. Also plays an important role in glucose homeostasis. For instance, negatively regulates the insulin receptor signaling pathway through the dephosphorylation of INSR and control gluconeogenesis and liver glucose production through negative regulation of the IL6 signaling pathways. May also bind DNA. {ECO:0000269|PubMed:10734133, ECO:0000269|PubMed:11909529, ECO:0000269|PubMed:12138178, ECO:0000269|PubMed:12612081, ECO:0000269|PubMed:14966296, ECO:0000269|PubMed:15592458, ECO:0000269|PubMed:18819921, ECO:0000269|PubMed:22080863, ECO:0000269|PubMed:9488479}. This is the function of Ensembl gene identifier ENSG00000175354 (PTPN2, protein tyrosine phosphatase non-receptor type 2).