Apple will support iPhones (and all devices it makes) for seven years from the last time it sold that particular model. So as long as your iPhone was still being sold by Apple up to seven years ago the company will still service it – in other words: help you fix it (for a price).