IMO, it all really comes down to software updates. With the exception of some Google specific Android devices (old Nexus phones, the current Pixels, etc) Android OEM's aren't particularly good about regular software updates- most Android devices are shipped with an OS that's at least a year behind the current Android OS, and take forever to get updated (if they do at all).
For the majority of people this matters not a whit. If you're security conscious at all (think financial stuff, messaging, etc), iOS and Apple is really the way to go. Each iPhone released will get at least 4 years worth of regular iOS updates, as well as timely security patches, small version updates and the like. These are pushed out to everyone at virtually the same time. With each newer version, you're assured of support for an additional year. For instance, this most recent iOS 11 update (Sept 2017) was pushed out to 5s models- which were released in September 2013. Most assuredly this will be the last update a 5s will get from Apple. 2018's update will most likely be the last the 6 gets, 2019 the last the 6s gets, etc... (note: as SJH and his 3G proves above, your phone will still work even if it has been sunsetted by Apple)
YMMV whether this sort of thing is important to you, but hopefully that helps inform your purchasing decision. I think each person's case is unique, but sometimes ponying up the extra 100 bucks to buy a more recent version may in some cases make sense, given the additional years of software support.
For the majority of people this matters not a whit. If you're security conscious at all (think financial stuff, messaging, etc), iOS and Apple is really the way to go. Each iPhone released will get at least 4 years worth of regular iOS updates, as well as timely security patches, small version updates and the like. These are pushed out to everyone at virtually the same time. With each newer version, you're assured of support for an additional year. For instance, this most recent iOS 11 update (Sept 2017) was pushed out to 5s models- which were released in September 2013. Most assuredly this will be the last update a 5s will get from Apple. 2018's update will most likely be the last the 6 gets, 2019 the last the 6s gets, etc... (note: as SJH and his 3G proves above, your phone will still work even if it has been sunsetted by Apple)
YMMV whether this sort of thing is important to you, but hopefully that helps inform your purchasing decision. I think each person's case is unique, but sometimes ponying up the extra 100 bucks to buy a more recent version may in some cases make sense, given the additional years of software support.