I'm not sure if there is a definite answer to this. Sometimes they are portrayed as friends and allies; other times they are portrayed as having a homosexual relationship. Is there any truth to the second theory? What do we know about their relationship?
It was in-tents.
Because they once slept together in the same tent.
Man I am on a dad joke roll today.
Anyway, that time they slept together in the same tent is the root of the myth - and let's re-emphasize this word myth - that Richard and Philip were lovers. While it is true that Richard seems to have a tendency to try to hump everything that moved, there is no evidence of any such relationship between the two men. The "tent incident" was a sign of truce and peace between the two.
The broader relationship between the two was not great. Richard wasn't that great a king, and while he was out of his kingdom on crusade (for which he is primarily remembered), Philip wasted no time savaging his territorial holdings on the continent, even though it was explicitly forbidden to take territory from someone on crusade.
So, not great friends.