Practical longevity of current Android phones
I second what @DeathMaskSalesman says in the comment - it largely depends on how you use your device and whether you load custom ROMs on it.

Bottom line is, unless you use the phone lightly, nothing can hold up to 5 years nowadays, and even then the battery will wear out. My 3-year-old Nexus 4, when retired at its 2.5 year of service, has its battery down to 1500mAh from the designed 2100mAh. This is increasingly serious a problem since recent smartphones tend to have non-replaceable batteries.