I have tried to execute simple php code in the php interpreter.
When I executed the command php -a
I getting the message
Interactive mode ena
After I got tired of compiling it on each machine I used PHPSH (as mentioned by joey-adams)
It is much better then php -a (syntax highlighting and autocompletion)
Install python phpsh
look at install-php5-with-readline-support-on-debian-wheezy
$ sudo apt-get install python # this is necessary to run phpsh
$ cd ~/
$ wget https://github.com/facebook/phpsh/zipball/master
$ unzip phpsh-master.zip
$ cd phpsh-master
$ sudo cp -r src /etc/phpsh # phpsh seems to complain unless it resides at /etc/phpsh
$ sudo ln -s /etc/phpsh/phpsh /usr/bin/phpsh # put phpsh on the $PATH