Apple is great about making the latest operating system run on older equipment. But just because you CAN do something doesn't mean you should! There are reports from iPhone 4S owners that suggest they might have been better off without upgrading.
With each generation of iPhones, iPads, and iPod touches, Apple typically increases the CPU, memory (which is different than storage), and overall performance. That's great, for early adopters. But when a modern operating system is installed on top of two- or three-year-old hardware, it might work, but sluggishly.
If you can't wait to run iOS 8, but your device is on the older side, consider selling or trading in the old device and getting a new unit with iOS 8 preloaded and guaranteed to work reliably. Fortunately, Apple equipment tends to keep its value, so it's possibly to get $100 to $200 or more for an old iPhone, which can offset the cost of a new iPhone. Or you can repurpose the older device, on an older OS for use as a music player, home automation controller, or kids' gaming device.