Does it run it satisfactorily?
IIRC you could install iOS 7 onto a 4, but it wasn't a good idea.
Edit: iOS 9 will install on the 4S, but...
...well, let's just say that there are lots of "but"s.
http://arstechnica.com/apple/2015/09/ios-9-on-the-iphone-4s-a-stay-of-execution-nothing-more/
IIRC you could install iOS 7 onto a 4, but it wasn't a good idea.
Edit: iOS 9 will install on the 4S, but...
...well, let's just say that there are lots of "but"s.
http://arstechnica.com/apple/2015/09/ios-9-on-the-iphone-4s-a-stay-of-execution-nothing-more/