PHP5-CLI
Be sure to grab this package, if you’re doing any major PHP development on your Ubuntu box.
Running PHP interactively is a fun and productive way to debug and test out your applications code without having to refresh your browser every time you make a change.
Besides having to install the package, you have to add the -a flag to /usr/bin/php under the terminal.
/usr/bin/php -a
It’s that simple. You can use absolute paths when including files, or cd into your applications directory and begin relatively including your code base.
While you could technically run your entire application under the interactive console, I would highly discern anyone from doing so. I recommend you just include the current file you are testing and work out any bugs one at a time.
I know a lot of developers are using and writing their own test modules to debug their code for them, but I prefer to be face-to-face with my code when I’m testing. You start to build a familiarity with your code in doing so and finding better ways to do things when you’re dealing with it personally. After all you’re going to be the one documenting and interfacing with the code, be one with the code.