I guess Im not totally clear on what youre doing. If youre trying to run PHP on your Mac, youll need a web server that will handle PHP.
If youre just starting out, Id recommend MAMP, which is a Mac AMP stack (Apache [Web], MySQL [DB], PHP [extension for Apache to handle PHP]).
Then with TextWrangler (great text editor BTW), youll edit your code, then browse it with Safari/Chrome/etc., on the MAMP configured IP/port (example:
http://127.0.0.1:8000)
If youre just trying to use the RUN command from the TW menu, thats just trying to invoke a shell script (hence the shebang" error, i.e., the #! expected when invoking a shell). TextWrangler is _just_ a text editor (not a full IDE like Visual Studio), it doesnt have a compiler, debugger, web services or anything like that.
Its not that much different if youre familiar with Windows based web platforms like .NET - you still need a local web server with .NET extensions. It just happens to be bundled into VS, so the RUN command in VS, creates an instance of a web server, with your application as the root, then points your default browser to it, so its very automagic (though when Im working in .NET, I have an IIS instance running non-stop, and generally just swap out to my browser vs. letting VS fire up an instance each time).