I have tried to execute simple php code in the php interpreter. When I executed the command php -a I getting the message
php -a
Interactive mode ena
To check if you have readline module installed, type: php -m | grep readline
php -m | grep readline
If nothing displayed, install readline module: sudo apt-get install php5-readline
sudo apt-get install php5-readline
After module installation you can recheck it's presence with previous command, than enter interactive mode with: php -a