Chances are the phone will have 8.1 or 8.1.1 installed. Rarely do the phones have the latest and greatest iOS revision installed from the get-go. 8.1.2 had been out for a good while when I went to get my iPhone replaced, but the replacement was on 8.1.
Back when I had my 5, 7.1 was out and my replacement phone was on iOS 6!