You are only as good as your tools.


This is a data decoder/encoder PHP/HTML thing, code name, DEcodENer - "de-code-en-er". Put data into the text area, select the data type, then click "decode" or "encode" and see the results. There is an option for a PHP function name to use for the data, and to search and replace in the data. And to run various language code.

It's just a TEXTAREA in which you write code or data and choose how to process it.

This is for localhost only, and expects a server to be installed, as well as PHP, of course.

The code support is for Perl, Perl 6, Bash, Go, Ruby and Python.

For Windows, Cygwin is expected.

Obviously, there are a great many similar and "better" - certainly prettier - *run code in a webpage* implementations out there; but this is for local testing, for localhost - so one can write to the filesystem and perform system calls.
This is basically to replace *the "edit, save, run, edit, save, run" command line process loop*. That is all.


When you enter data - URL, base64, JSON (you select a radio button for which) - you can decode or encode that data.

It should be rather easy to manually add other data formats such as UU, bin/hex, pack/unpack, whatever - basically any PHP decode/encode function.

It is, however, not that easy to add sh^Htuff. The code needs to be completely redesigned in a way that the "what to do" stuff is INI-like data. More later...

Run Code

When you enter code - PHP, Perl, Perl 6, Bash, Go, Ruby or Python (again selecting a radio button) - you can run that code and see the results.

One uses either the "decode" or "encode" to run the code. The code is stored in a temporary file which gets executed via exec(). The output results are returned, errors res redirected to a file to that any errors can be seen.

The stored temporary file is "tmp.typ" and can be imported into the textarea by selecting one (if the exists) and clicking "encode/decode".


Go code should not have the "main/import" glue, but just what would be in main. (The glue gets added/removed as appropriate.)


There are several other options. You can run a PHP function on the data, with optional arguments, to see the result. You can search and replace in the data entered.


The code is small - 450 lines. It ain't pretty - it does not have to be, it just has to work (though it's not too bad).