|
1
|
A small snippet that allows you to write/paste PHP code in your browser to have the server evaluate it and print the results. Useful for debugging and testing, it provides a PHP equivalent to Visual Basic's immediate window.
Writing some string parsing code or some tricky math and want to quickly test it to see if you're on the right track? (ie: to avoid off-by-one errors) Don't feel like creating a new file on the webserver, pointing your browser to it, seeing you got it wrong, going back to your text editor, changing something, re-saving, reloading your browser, etc., etc.? Just paste this code in a new file (call it whatever you want), save it somewhere on your webserver, point your browser to it, paste your PHP code in the textarea and hit "Execute". The form will be submitted to itself and the results of your execution (including the return value) will be displayed under the textarea. Code in that textbox must follow the rules set out by eval: http://www.php.net/manual/en/function.eval.php (ie: must end with a PHP statement and a semicolon...) WARNING - WARNING - WARNING - WARNING - WARNING - WARNING - WARNING - WARNING Do not leave a file that can blindly execute any code sent to it (like this program) accessible to the general public on a production web server! You have been warned! :) |
1 comment
Add a comment
Sign in to comment

Download
Copy to clipboard

A similar script. Here's a script I used to use for similar purposes. The main difference is that mine evaluates expressions, not code blocks, and all results are formatted with print_r(). I used this to learn about PHP's many array-related functions.