"All things being equal" is a very contrived situation. I think a better question is whether you'd pick a PhD candidate over a BS who, for example, could code a little bit better. (And for me the answer is I'd probably pick the BS, but I'd have to justify it to the people above me, which could be a challenge.)