If you have a Windows OS, just add IIS from add/remove programs and install PHP following the instructions on their website. I've successfully done this on Windows 7.
For macs, you can try this, I've never used it but it's the first result for 'php server for mac'. Bottom line is you have to install a php server on your machine if you want to run php code locally, but it's nothing to be scared of.
If you already have a php server installed and configured, then it's a matter of changing your web server's listening port. So, you have two options (maybe only one because I've read that sometimes changing the default port on macs isn't possible, although I don't know why or how it's not)
1) Change the only listening port, by altering the httpd.conf file and changing the line that reads
2) Add a listening port, by adding a line that reads
After either of these you will have to restart your httpd service on the machine.