How to factory reset an iPhone - with or without a passcode

INSUBCONTINENT EXCLUSIVE:
If you're getting rid of your old phone, make sure you're not leaving yourself open to data theft