mark.bockenstedt.net header image
Twitter
Gaming Linux Mac Software Tech
mu Updates
Web
Musings Rants & Raves Rumor Sports Weather
Video Reviews

PHP Shells

July 16th, 2008 · No Comments

One of the main things I like about scripting languages like Python and Ruby (*shudders*) is that they have an interactive shell mode. This allows a developer to quickly write some sample code and see what the result of that code is. In the web development industry, this isn’t quite as common. I generally find myself creating a new file in my PHP document root so I can test a few lines of code to see what comes out of it. What I’d really like to be able to do is go to a website and punch in that code and see the result.

This is where I found PHP Interactive. PHP Interactive allows me to drop the tarball into my document root, then simply point my browser to it. From there, I can enter whatever code I want and see the result in either HTML format or raw format. This package supports tabbed text areas so you can keep some of your most used code handy.

There are a few flaws I found in PHP Interactive. The main, serious flaw is that it uses the eval() function on whatever code you put into the box. This should throw up some red flags for those using it, so make sure you’re very careful with where you put it and who has access to it. The other complaint I have is that it’s hard to write well-formatted code because the tab key defaults to its normal behavior of switching elements. All grips aside, this is a useful tool for testing a few lines of code when it’s not worth creating a new file for it.

Categories: Software · Web
Tags:, ,