For what its worth,
I do this all the time, and in order to make it easy,
and not have to add the php folder to my path permanantly becasue I have more than one version of php on my system most of the time i have a batch file that I keep in a folder that is on the PATH.
When I want to run php from a command line I open a command promt and run this batch file to setup any environment variables that are required to run my php scripts . It also adds the mysql folder to the path so I can use he mysql.exe command line tool as well if I want.
Here it is
echo off
if %1.==php5.4. GOTO PHP54
GOTO defaultPHP
HP54
path=%path%;d:\wamp\bin\php\php5.4.11
ECHO Adding settings for PEAR and PHPUNIT php5.4.11
set PHP_PEAR_SYSCONF_DIR=D:\wamp\bin\php\php5.4.11
set PHP_PEAR_INSTALL_DIR=D:\wamp\bin\php\php5.4.11\pear
set PHP_PEAR_DOC_DIR=D:\wamp\bin\php\php5.4.11\docs
set PHP_PEAR_BIN_DIR=D:\wamp\bin\php\php5.4.11
set PHP_PEAR_DATA_DIR=D:\wamp\bin\php\php5.4.11\data
set PHP_PEAR_PHP_BIN=D:\wamp\bin\php\php5.4.11\php.exe
set PHP_PEAR_TEST_DIR=D:\wamp\bin\php\php5.4.11\tests
GOTO EndPHP
:defaultPHP
path=%path%;d:\wamp\bin\php\php5.3.17;d:\wamp\bin\mysql\mysql5.5.28\bin
ECHO Adding settings for PEAR and PHPUNIT php5.3.17
set PHP_PEAR_SYSCONF_DIR=D:\wamp\bin\php\php5.3.17
set PHP_PEAR_INSTALL_DIR=D:\wamp\bin\php\php5.3.17\pear
set PHP_PEAR_DOC_DIR=D:\wamp\bin\php\php5.3.17\docs
set PHP_PEAR_BIN_DIR=D:\wamp\bin\php\php5.3.17
set PHP_PEAR_DATA_DIR=D:\wamp\bin\php\php5.3.17\data
set PHP_PEAR_PHP_BIN=D:\wamp\bin\php\php5.3.17\php.exe
set PHP_PEAR_TEST_DIR=D:\wamp\bin\php\php5.3.17\tests
:EndPHP
php -v
REM ADD MYSQL
path=%path%;d:\wamp\bin\mysql\mysql5.5.28\bin
mysql -V