PHP Interactive Mode

May 8th, 2006

Python programmers will be familiar with Python’s interactive mode. This is really cool. It allows you to type a line of python code and Python will execute it straight away. It’s really nice for debugging and testing. It’s also cool if you want to play around with Python.

Python Interactive Shell 

Besides Python’s extensive library, this is probably my favourite feature of Python.

PHP has a similar feature but compared to Python’s version, it kinda sucks. You can access it by typing php -a at the command line.

PHP Shell

Now PHP has a more respectable interactive shell. You will need PHP 5 to use it.

This tool could be a real boon for PHP developers, especially those developers who want to take PHP to the extreme and onto command line/GTK scripting. 

About the Author: Hi! I'm Ken. I've been using mobiles for over 10 years and technology for a lot longer! I'd love to hear from you.

Like this tip? Get the most from your mobile phone...

  • Discover brand new ways to use your mobile phone
  • Techniques to get more out of your mobile phone for less
  • Be the first to learn about new mobile technology

Enter your email to receive free regular Ken's Tech Tips:

  • PHP
  • Comments(1)

One Response to “PHP Interactive Mode”

  1. lenzoon 27 Sep 2009 at 6:03 pm

    Facebook has open sourced a wonderfull implementation off an php interactive shell its far more mature… you definitely want to try this one!

    http://www.phpsh.org/

    just a great pice of code work!

Trackback URI | Comments RSS

Leave a Reply