Kinda.
JavaScript is a client side language. This means that all processing of the code is done on the clients machine.
PHP is a server side language. This means that all of the processing of the code is done on the server.
So if you want to have your PHP affect your JavaScript it can be done. The way to do this is to have the PHP generate and output the pieces of JavaScript that will be run on the clients machine.
If you want to have your JavaScript affect your PHP this really can't be done, the only real affect you can have it to have the JavaScript manipulate any posted data that is coming from the browser before your server gets it and starts the PHP working on it.