Many American Ph.D. programs will let you pick up a Master's along the way just by completing the required coursework and submitting a form at the appropriate time - generally right before your comprehensive exams / selection of a thesis topic.
It's therefore possible to apply to Ph.D. programs, get accepted, spend the first couple of years figuring out if a Ph.D.'s for you, and then, if you decide negatively, leave with the "consolation Master's" - a degree completely indistinguishable from a terminal Master's, except:
- you were in a Ph.D. program, so you likely got a full fellowship instead of paying tuition yourself;
- you were in a Ph.D. program, so you had an easier time getting grants;
- you were in a Ph.D. program, so you got more access to and were treated more seriously by top-quality professors.
I got my consolation Master's in 2003 from a program I'd probably still be paying for today if I had applied for the Master's directly.