you can use php -f option to specify the file to be executed
I am assuming that you are using the Linux command line:
One option you have to install php shell (http://www.phpsh.org/ ) and another one what @Shyam has suggested i.e. $ php <filename> (-f is optional)
$ php <filename> (-f is optional)
Just Run the PHP Command Line Interface(CLI) program and provide the PHP script file name as the command line argument.