If you back up the content of your old iPhone through iTunes (with a password), and setup the new iPhone and restore from that backup, then all music should be transferred as well as other content. Afterwards, if all was successful, you may restore the old iPhone to factory settings, to part with it without your personal settings.
Some third party apps may notice the different device (e.g. WhatsApp), but that is most often easily restored with a confirmation.