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
If you're using Mac, then install Homebrew (http://brew.sh) then type: brew install phpsh
And then you can run phpsh to get an interactive shell.