sql
html
css
c
ajax
linux
android
ruby-on-rails
regex
mysql
objective-c
silverlight
html5
json
facebook
cocoa
tsql
delphi
api
postgresql
Scripts don't run on a port, the Webserver executing the script does.
It is not 100% clear from your question, if you want to achieve your goal for one script only, or for all scripts - your strategy depends on that.
If you want all "scripts" to be seen on another port, simply change the webserver configuration to listen on a different port. If you want just one script, you are likely to run into more substantial issues: Cookies, authentication mechanisms, XHR, etc. rely on a "same origin policy", that will most likely be violated by this.
Additionally, chaniging a webserver port for security is called "security by obscurity" - a quick google will tell you about how effective this is.
Turns out you cannot do that. It is in fact matter of web server, PHP is one level above. Given you probably use Apache as the underlying layer, you have to set the port there.
Dude just set up a new server in apache. There is a file that configures this, Look for the config file that matches your OS/Apache Installation.