lighty's life

lighty developer blog

A Interactive PHP-Shell

I was always jealous of iruby and ipython, the interactive shells for Ruby and Python. Instead of writing a script and running it through the interpreters you just execute the script line-by-line while you write it.

For debugging this is great. Compare a shell-script against the normal shell usage. It is more a ‘What if I …’ pattern instead of ‘I can write 100 lines of code without testing it’.

PHP was missing a powerful shell for a long time now. I needed one for my team at work and ‘php -a’, the interactive shell of PHP 5.0.x, is still not able to handle basic FATAL errors like ‘Function foo() not found’. So I wrote a php based interactive php-shell

The installation is simple:

$ pear install

The installation process will install shell wrappers for Unix and Windows:

win> php-shell.bat

It will open your prompt, there you go.

If you are seeking for help, go to

Enable javascript to load comments.

Please note that we won't accept comments for posts older than 3 months! Also please use our bug tracker to report bugs, and our irc channel #lighttpd@freenode to chat.

« One more opcache for php (Preview) lighty at the railsconf »