Many compounds can be extracted from the milky, sticky latex of spurges like Euphorbia characias, including the spirotriterpenoid, 3,7-dihydroxy-
4,14-dimethyl-7(8-9)-abeo-cholestan-8-one.
The sap is poisonous and acts as a deterrent to herbivores. It oozes from any wound to the plant and congeals on contact with air - effectively gumming up the mouthparts of insects attempting to graze the plant. The latex becomes toxic once exposed to sunlight (phototoxic) and is irritating to the skin and mucous membranes.
The latex was used as a purgative and the name spurge refers to this ("espurge" is Middle English/Old French "to purge").