I think you are a little muddled.

PHP has nothing to do with JavaScript.
PHP is a purely server-side technology; JavaScript is purely client-side.

No JavaScript variables are persisted after the user navigates away from the page.