How long will my iPhone last?

I have the iPhone 6s with iOS 11.2.6. How many years will apple continue to support my phone.

Apple updates are only limited by any particular phone having enough resources (CPU power and RAM etc) to properly run whatever the latest version of iOS is.

Typically it's probably about four years, from personal experience.

Even then, though an old phone will not run the newest operating system it does not in any way affect how you can use it as a phone, it just may not be able to run some of the latest apps.

"Support" is actually pretty much irrelevant once something is out of warranty.
It's no different to desktop / laptop computers, an old enough machine can still work perfectly in its own right even if it's not capable of running the latest operating system or newest application or games.

In either case, it's more likely to be considered outdated when _you_ decide you need extra capabilities that because anything has changed with the phone or computer.

I have an iphone 4 [around seven years old] that I keep as a spare - it still works perfectly, the fact that it does not run the current iOS version is irrelevant.