Ah, wait.
php is SERVERSIDED...
so if the server is *nix php will execute there and of course there the shell commands do work...
unless your webserver is buggy no php will ever reach the client... at least it should not.
what happens (or should at least) is that you send requests to the server, usually via http, and php works upon this request. so it doesn't matter what the client is because all it has to do is pack the data php requires and send it to the server.
the client does NOT have to process anything - that would be clientsided and is what JavaScript or other clientsided scripts do.
you have always to keep in mind where the action actually happens.
i hope this helps you and i didnt misunderstand your question from the beginning.
example for how it works:
client: (html/javascript/...)
<form>
....formdata, modified by clientsided script
</form>
--> submit action
--> request with data sent to server
server (php/perl/...)
takes formdata (
URL?var_name=somevalue
becomes
$var_name = "somevalue";
--> php engine works and calculates answer to request while for example calling a shell script
--> webserver sends answer to request (usually html, wml or something the client understands) to client
--> client displays answer
if you want to see what happens if this goes wrong play around with headers of output files a little, especially if you use xml/xhtml definitions...
i hope this makes clear what happens where....
as i said, i hope i had your question right in the first part. if not so i apologize and ask to further explain your question...
it's quite possible that i'm more than a little dumb now and then.
lauchs
greetings, jakob