It is not a good idea to enroll in a Ph.D. program just to get a masters degree.
The masters and the Ph.D. have fundamentally different coursework requirements. (Usually, there is much less coursework for a Ph.D.)
The advisor funding you will get upset if you take too many classes while enrolled as a Ph.D. student, because they will want you focused on getting into research from day one.
They may also veto class choices that they don't see as relevant to your research direction.
Most Ph.D. students that get a masters along the way get one three or four years into the program, because they spread their courses out.
Also, if your advisor comes to believe that you were just "scamming" funding to get a free masters degree, not only will they cut your funding, but you are also going to be in an awkward position when it comes to letters of recommendation.
In short, don't enroll in a Ph.D. program to get an masters degree.
That said, I do fund bright, promising M.S. students with the hope of converting them into Ph.D. students. Other professors do the same.
Your best bet for getting funding as a masters student is to apply to work with a specific professor and opt to do a masters thesis instead of just coursework.