Your PHP script lives on the server.
It PRINTS or ECHOs output data that gets displayed as a standard HTML web page.
Unlike Javascript, PHP code NEVER appears in your web page.
example.
Save this script to the server in a file called 'info.php'
<? echo phpinfo(); ?>
now make a link like <a href=info.php>Click me</a>
The outpage returned will contain a boatload of html code and will display in your browser as a very fancy webpage. It won't contain the script "<? echo phpinfo(); ?>" anywhere.