For the hardware aspect, it in part depends on the quality of the Android handset. If it was a budget handset that wasnt designed to be durable and last a long time.
Then it likely wouldnt outlast the iPhone. The more premium built models can and often do last longer. and sometimes even budget phones just wont die. With any iPhone, if the battery is sealed inside and begins to show age, you can bring it to Apple for a new battery. This is also true of HTC phones and Samsung phones. LG phones generally have removable batteries so you can swap in a new battery yourself. All batteries age, regardless of platform.