hg
do i need apache server in order to work with php?
you need a webserver , it neednt be apache though most here would recommend it
you can run php from the command line but not for web related stuff which is what I assume you want to do
php as an apache module is about as popular as it gets though sambar( www.sambar.com ) runs a mean php (+other stuff) or search for omnipro or xitami or badblue which all run PHP as a CGI and are a little easier to set up.
And of course that wonderful piece of well-written software, PWS!
Actually, you don't need a webserver. You can call PHP using the shebang line and let it run that way. That's what I do on this computer. And then I have a dedicated localhost running for my "official" development.
(And for those that don't know what the shebang line is, it's where you put #!/path/to/php at the top of the script.)