Phosphatase that plays a role in immunity, learning, synaptic plasticity or cell homeostasis (PubMed:25825441, PubMed:27246854). Regulates neuronal cell homeostasis by protecting neurons against apoptosis (PubMed:20086240). 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 (By similarity). May act at junctions between the membrane and the cytoskeleton. H2O + O-phospho-L-tyrosyl-[protein] = L-tyrosyl-[protein] + phosphate Interacts with MAPK12 (via C-terminus); this interaction abolishes PTPN4 catalytic autoinhibition and thus activates the phosphatase activity. (Microbial infection) Interacts with attenuated rabies virus protein G; this interaction is required for virally-induced apoptosis. Highly phosphorylated on serine and threonine residues but not on tyrosines. Cleaved and activated by calpain I/CAPN1. Belongs to the protein-tyrosine phosphatase family. Non-receptor class subfamily.