The easiest way is to have a web server and PHP on the computer you are working on, then you just save in the correct folder and look in the browser. If you use a database you should have that as well.
Be sure to use the same versions that you use on the live server, otherwise it may cause trouble.