Applying for job at same university as PhD application
First of all, apply for both. It is the best for you to be open to all the options. 

However, if both applications goes through, I would recommend to choose the job; simply because you probably will get paid better on the top of learning about the research without the clock ticking. Also, you become a staff and not a student; and you will be treated more professionally. 

You can always switch to the Ph.D. after working for sometime, knowing exactly what you want to work on; based on your research-based work experience.