How to execute php in ready function?

How to execute php in ready function?

I want to execute php in javascript file (js extension file) how can I do this?
 
Thanks