Which GUI applications can execute short PHP snippets directly? Instead of having to create a temporary file and run it on the command-line or in the browser, I'd like to write some code in an editor, click "Run" and see the results directly (preferrably with a dump of all local variables).
I find that the PHP interactive shell is way too basic.
It seems like a very simple application idea, so there should be several small utilities that do this. Do you know of any?
(I'm mostly interested in Linux applications, but feel free to suggest applications on other platforms as well, for other fellow super users.)
php -e
(executes code directly from argument) andvar_dump()
goes a long way in practice, I find. Typically PHP applications depend on some sort of input in form of request variables. In that case a browser is the most obvious way for output. Since the request must go through the web server, you cannot get a variable dump without specifying this output in the code withvar_dump()
or similar (massive security hole otherwise). In case you just need to test various functions to see how they respond to simple arguments,php -e
is nice.