Please read the response from KiltedTim again carefully.
If you purchased the phone directly from Apple, you have 14 days to return the phone for a refund. If you want to buy another iPhone with your refund money, you can do so.
If you did not purchase the phone directly from Apple, then you are subject to the store policies. They may or may not have the same type of 14 day money back return privilege as Apple. Apple has no control over this. You will have to deal with the store directly yourself.
If you cannot return the phone for a refund and then purchase another phone with the funds, then you are subject to Apple's warranty policies. Those policies state that Apple service has the option to repair or replace the phone. If the phone cannot be repaired after a few attempts, Apple might logically offer a replacement.
The bottom line.......if you cannot return the phone for a refund, you are not going to get a replacement phone unless it cannot be repaired after a few attempts.
The only exception to this might be if there are consumer laws in your country that would allow you to return the phone to the selling dealer for a refund for up to 30 days.