Mediates the production of the second messenger molecules diacylglycerol (DAG) and inositol 1,4,5-trisphosphate (IP3) which plays an important role in the regulation of intracellular signaling cascades (By similarity). Required in the nervous system to modulate neuronal activity. Facilitates synaptic transmission at neuromuscular junctions by regulating the release of acetylcholine from the motor neurons and thus affecting locomotion (PubMed:10571228). Plays a role in efficient egg laying and defecation (PubMed:10571227, PubMed:10571228, PubMed:24212673). Involved in axon regeneration after injury (PubMed:23072806). Plays a role in male mating behavior by regulating spicule insertion and sperm transfer (PubMed:15958491). By triggering Ca(2+) transient via IP3-mediated activation of IPR3 receptor itr-1 in ASH sensory neurons, regulates avoidance behavior in response to nose touch (PubMed:19730689). By activating tpa-1 via DAG production, required for the expression of antimicrobial peptide nlp-29 in response to fungal infection (PubMed:19380113). During embryogenesis, may play a role in epidermal morphogenesis together with plc-1 (PubMed:18369461). a 1,2-diacyl-sn-glycero-3-phospho-(1D-myo-inositol-4,5-bisphosphate) + H2O = 1D-myo-inositol 1,4,5-trisphosphate + a 1,2-diacyl-sn-glycerol + H(+) Present in neuronal cell somas and axon processes of the nerve ring in head ganglia. Present in the adherens junction of intestinal cells. Expressed in most or all neurons with high expression in the head and tail ganglia and low expression in the motor neurons of the ventral cord. Expressed in the intestine (at protein level) (PubMed:10571227, PubMed:10571228). In males, expressed in vas deferens, spicule protractor muscles, diagonal muscles and a male-specific neuron (PubMed:15958491). Mutant worms are similar in size to the wild-type but animals are bloated with eggs due to defective egg laying with decreased body flexion and sluggish locomotion (PubMed:10571227, PubMed:10571228). They have defects in the posterior body contraction step of the defecation motor program and become sluggish in the presence of exogenous betaine (PubMed:24212673). Animals are resistant to aldicarb, a carbamate insecticide (PubMed:10571228). Simultaneous knockout of egl-8 and snf-3 results in uncoordinated, hypercontracted and paralyzed animals (PubMed:24212673). RNAi-mediated knockdown causes a defect in sperm transfer and a slight defect in spicule protrusion resulting in male infertility (PubMed:15958491). Ca(2+) transient increase and avoidance behavior are defective in response to nose touch but not to benzaldehyde (PubMed:19730689). nlp-29 expression is abrogated following fungal infection by D.coniospora but not following physical injury (PubMed:19380113). Causes a 1.6 fold increase in embryonic arrest in a plc-1 (tm753) mutant background (PubMed:18369461).