Originally Posted by ac_kumar
i don't know php well but i have run a php script in ubuntu while i test LAMP server (Linux Apache MySql PHP)
the php script is need to be placed in Apache directory (/var/www ) place the php script in index.html than go to browser and type \\localhost to check the script.
Sorry, but this is misleading, and doesn't address the OP's question, which is how to run PHP commands/scripts from the TERMINAL
OP, mistofeles gave you a good start. Just type in "php <name of your php script/command>", or "php --help" for a list of command-line options.