Will a dropped class hurt PhD application?
If you have an otherwise excellent application, then withdrawing from a single course is unlikely to make much of a difference, especially a course in another field.  For example, if you get A's in four graduate math classes and drop a physics class in the same semester, I doubt any math graduate school will care.

It could look a little strange if the dropped course were on your proposed specialty (so people would think you'd be particularly enthusiastic about it), but even that wouldn't be a disaster.  If you aren't taking many courses and are getting worrisome grades in the others, then a W may look like you're narrowly avoiding an even worse grade, but in that case your application already has problems aside from the W.  Overall, the way I'd look at it is that the W might intensify other weaknesses in your application, but isn't likely to be a big obstacle in isolation.