An esophageal pH test measures the pH, or amount of acid, that flows into the esophagus from the stomach during a 24-hour period. The patient does not need to be in the hospital for this test.