You can't.
Javascript runs in the user's browser.
PHP runs on the server. It reads your .php files, runs PHP that it finds, sends HTML to the browser, and exits.
There is no "spooky action at a distance" that allows you to run PHP code from within the Javascript code.
Unsure what you are trying to accomplish. You could use Ajax to send some data to your PHP server. But it will run a new script.
Maybe you mean you want PHP to process JS files before they are sent. That is a PHP question, but I think was recently answered here. JS files aren't normally processed by PHP, but apparently there is a way to configure PHP to do so. Google is your friend. Or ask on a PHP forum.