What would I need to show to change fields and get into a physics PhD program? I've been working as a software engineer for a few years now, and have a bachelor's in computer science and math. My interest and knowledge in physics has been growing since I graduated, but I never took any formal courses after high school.

Obviously, entering into a physics PhD would require a huge amount background knowledge comparable to a bachelor's in physics. My question is what would I need to do to prove that I had that knowledge, and actually get accepted into a program?

Would it be enough to score high on the GRE, and have some strong letters of recommendation? Could I do it with enough statements of accomplishment on coursera? Or am I looking at a few more years of undergrad to get a second Bachelor's? Or could I get into a master's program, and use that as a stepping stone?

Thanks.
Seeing as nobody else has answered and this is judged not to be a duplicate of this question, I'll quote my answer from there (except with &quot;math&quot; changed to &quot;physics&quot;), which also applies here:

If you're asking about graduate school in the US, probably the single most significant thing you can do is to take the GRE subject test for physics and score well on it. This test covers a broad spectrum of material that is taught in a typical undergraduate physics curriculum, and so if you get a good score, it strongly supports your claim that you have the level of physics knowledge required to enter grad school. Without that key piece of evidence (i.e. a good GRE subject score), graduate admissions committees are likely to look at your statement that you have the knowledge to take graduate courses, contrast it with your lack of an undergraduate degree, and conclude that you're full of hot air, so to speak.
Now, of course there is more that has to be done to actually get yourself admitted. You can't get into grad school based on even a 990 (the top score) on the GRE alone; you'll probably have to present some other sort of evidence of accomplishment that could be viewed as equivalent to an undergraduate transcript. You'll also need recommendation letters and various sorts of essays and forms. But a lot of that can vary from school to school, and is more likely to be negotiable if you talk to someone in the department. The GRE subject score is the one thing you really need to get your foot in the door, so to speak.

Beyond the GRE, probably the best thing you can do to increase your chances of getting into physics grad school is to have some physics research experience, with a good recommendation letter from your supervisor(s), although strictly speaking this is not necessary. However this might be somewhat difficult to get given that you're not currently an undergraduate.
I don't think there's much to be gained by using a masters program as a stepping stone, at least not among US graduate schools; in fact, there are not really many masters programs in physics at all. People who go to grad school in physics typically go straight from their undergraduate career into a PhD program, without a separate masters program in the middle.