Phosphatase that plays a role in immunity, learning, synaptic plasticity or cell homeostasis (PubMed:17953619, PubMed:25825441). Regulates neuronal cell homeostasis by protecting neurons against apoptosis (By similarity). Negatively regulates TLR4-induced interferon beta production by dephosphorylating adapter TICAM2 and inhibiting subsequent TRAM-TRIF interaction (PubMed:25825441). Dephosphorylates also the immunoreceptor tyrosine-based activation motifs/ITAMs of the TCR zeta subunit and thereby negatively regulates TCR-mediated signaling pathway (PubMed:18614237). May act at junctions between the membrane and the cytoskeleton. H2O + O-phospho-L-tyrosyl-[protein] = L-tyrosyl-[protein] + phosphate Highly expressed in testis. Specifically expressed in spermatocytes and spermatids within seminiferous tubules (at protein level). PTPN4-deficient mice are born at normal Mendelian ratio with no apparent developmental or phenotypic defects. They display normal cytokine production and T-cell effector functions (PubMed:18614237). However, they show impairment in motor learning and cerebellar long-term depression (PubMed:17953619). Belongs to the protein-tyrosine phosphatase family. Non-receptor class subfamily.