Love the Python REPL interface? Wanna do something like that in PHP? Let's try Boris, the missing PHP REPL:
To install boris in Ubuntu (I'm using v14.04), the easiest way is to clone the git repository:
$ git clone git://github.com/d11wtq/boris.git
$ cd boris
$ sudo ln -s /path/to/boris/bin/boris /usr/local/bin/boris
Now you can test-drive your PHP code in command line without writing all the code at one.