I am new to PHP . I have primarily worked on java. I want to run the helloworld program for PHP. I got it how to do it through blog
But I have got some basic questions :-
To answer your question:
If you are on Linux, I guess you need to install Apache, PHP separately by yourself (using those apt-get commands)
After you have installed Apache, it will search for PHP via the httpd.conf file by default.
Yes, if you want to run PHP as a script, you can run it in a terminal like /path/to/php somePhpFile.php