My friend sent me this link awhile ago on how to set up your local machine with apache and php, and if you use Macromedia Homesite (previously owned by Allaire) for developing, you can test/de-bug scripts on your local machine.
My friend has done this setup and said it worked pretty well. Might give it a try on a day I feel daring. 😉