Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
I run my battery past 50% down, then charge. Once a month, run the batter completely out, then charge. If you charge on 80% or 90% you will be fine, but I don't do this (or recommend) charging every night unless you are out 50% every night. Usually I can run my iPhone for 3-4 days on one charge.
 
My 3G iPhone, which I had for around 1.5 yrs, had really bad battery performance after around the first year mark.
 
Lithium ion batteries like to be topped off, so it's better to charge every night rather than using it until fully discharged. If you're not going to use the phone for a long time, it's also best to store them at partial charge (40-50%) in a cool environment.

Of course this is entirely theoretical, in real life it probably doesn't matter. My old 2G gets relatively decent battery life (2-3 hrs) but I took pretty good care of it.
 
the ip4 battery is easy to swap DIY style. and by the time you need to replace it, the you'll probably want to replace it with the iphone 6...
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.