Overheating issue

I was changing my iPhone 5 in the car when I noticed it was getting hot. I unplugged it and it continued getting hotter. The screen was blank, I tried holding down the power button but it still continued getting hotter. There was nothing I could do but to leave it until the battery was flat. It wouldn't charge after that.
I took it apart and replaced the battery, then it started getting hot again without having switched it on. The area it seemed to be getting hot was at the top right beneath the camara lens. Anyone know how I can fix the problem?
I'd have Apple or a reputable repair shop look at it. Could it be an app doing it?
Definitely take it to an Apple store if you have one near you and se what the folks there say. I honestly don't think something like this can be diagnosed over the internet.
Maybe you're right. Thanks for replying.
Good luck with your phone. Something doesn't sound right!

Original thread: https://forums.imore.com/threads/overheating-issue.353478/