Has bacteriolytic activity against Gram-positive bacteria. Plays a role in defense against bacterial pathogens. Involved in pharyngeal grinder function by enabling proper lysis of ingested bacteria. Hydrolysis of (1->4)-beta-linkages between N-acetylmuramic acid and N-acetyl-D-glucosamine residues in a peptidoglycan and between N-acetyl-D-glucosamine residues in chitodextrins. Optimum pH is 4.5-5. Predominantly localizes to the recycling endosomal network in the basolateral region of intestinal cells. Secreted in the intestinal lumen only during dauer arrest stage, aging, or starvation. Expressed in pharynx grinder muscle pm7, isthmus marginal cell mc2 and pharyngeal muscle cell pm5, intestinal cells and at lower levels in coelomocytes and epidermis (PubMed:27525822). Expressed at low levels in intestine (PubMed:20617181). Expression levels are low throughout larval stages and then increase in adults. Intestinal expression starts at the L1 larval stage, declines at the L2 larval stage and increases again in L4 larvae and adults. Highly expressed in the intestinal lumen of dauer larvae and, old and no longer self-fertile adults. Induced in the intestine by Gram-positive bacteria M.nematophilum CBX102 and UV336 and M.luteus DMS20030 infection but not by Gram-negative bacterium P.aeruginosa PAO1 infection (PubMed:27525822). Induced in the intestine, pharynx and vulva by Gram-positive bacterium S.aureus infection (PubMed:20617181). Induced by Gram-positive bacterium B.subtilis (PubMed:20617181). Induced by starvation (PubMed:27525822). Slight reduction in brood size. 24 percent reduction in lifespan which is further reduced upon M.nematophilum CBX102 bacterial infection. Impaired food digestion characterized by the accumulation of unlysed E.coli in the intestine. Accumulation of unlysed bacteria is stronger upon M.nematophilum CBX102 infection. Belongs to the glycosyl hydrolase 22 family. Type-I lysozyme subfamily.