The French philosopher Rene Descartes thought about this problem in his famous work called Meditations published in 1641.
Descartes was unhappy with earlier attempts at philosophy because, he said, they didn't give us certainty. He wanted to find things we can be absolutely sure about, not things which only might be true. Certain truths, he said, cannot even be doubted. Anything which can be doubted is not good enough: it may be true but it may not.
Descartes started by considering the information we get through our senses: sight, hearing, touch etc. Can we be certain about this information? No we can't, he decided, because it can be doubted for three reasons:
Descartes concluded that our sense experience cannot really be trusted. However, the fact that I am thinking about this problem means that I must exist. Even an evil demon cannot deceive me if I am not here to deceive! As he put it: "I think, therefore I am."
Descartes was pretty sure he was awake when he wrote this. Like us he knew that dreams are often more vague than real life, don't usually involve feeling pain or other sensations, and sometimes have weird plots. But, he said, "pretty sure" is not the same as "certain".
So - Phoebe is right and Philip is wrong, at least according to Descartes.
To find out more about Descartes, click here.