Worms such as earthworms use their pharynxes to swallow food, according to the University of Pennsylvania. The pharynx is part of the worm's digestive system along with the crop, esophagus, intestine and gizzard. DeAnza College uses the flatworm as another example of a worm with a pharynx.
In simple worms such as flatworms, the pharynx is a muscular tube that allows the animal to ingest food into its gastrovascular cavity. The opening of the pharynx functions as both the mouth and anus, since the flatworm's gut goes two ways. On the other hand, worms such as roundworms and earthworms are far more complex and do not have gastrovascular cavities.