Apparatus is a web-based PHP read-evaluate-print interpreter. It allows you to quickly execute and view the output of your code all from your browser.
Apparatus
Version: 0.3.0 beta
License: BSD
Stand-Alone: Download - Version 0.4.0
WordPress Plugin: Apparatus for WordPress
Donate
You can support this application by provding a link here, writing a blog post about it, or telling your friends.
Providing a donation will also ensure that support for this application continues:
Screenshots
![]() | ![]() |
![]() | ![]() |
![]() |
Documentation
Installation
Download and extract the files. By default the files are in a directory called ‘apparatus’ and the main file is ‘apparatus.php’. For security purposes it is recommended that you change the name of both the directory and main file. Do not change the names of any other files. Locate and open config/config_sample.php, find the line define(APP_PASSWORD, 'yourpassword'); and change yourpassword to a password of your choice. Afterwards, rename config_sample.php to config.php. Upload the entire directory to a location of your choice. You can now access Apparatus by typing the url of your main file into your browser (ie example.com/apparatus/apparatus.php). Use the password you created to login.
Usage
Once logged in, you can begin entering your code. Press the run button to execute the code and have the output displayed back to you. Any errors warnings or notices will also be reported. When inputing your code DO NOT begin with opening tags: <?php and finish with closing tags: ?>. This is already done for you. If you want to exit PHP mode, just insert an end tag as you normally would, and make sure to insert an opening tag when reentering PHP mode or before the end of the code.
Features
- Syntax Highlighting and Line Numbering – Executed code will be displayed back to you with line number and syntax highlighting.
- Error Reporting – Apparatus will display any errors, warnings, or notices generated by your code as well as indicate with an icon the line causing the issue. The icon is also a link, clicking it will automatically google the error message so you can quickly find a solution if needed.
- Tab Override – Apparatus comes packaged with Tab Override, which allows you to use the tab key as you normally would in an IDE without losing focus on the textarea. Note that this feature is only compatible with Firefox and Opera.
- Output Modes – Choose between two output modes: Code and HTML. Code displays the raw output of your code without rendering any html. HTML mode displays the output and allows the browser to render any html it contains.
- Update Checking – Click the Check for Updates link to check if a newer version of Apparatus is available.
F.A.Q.
Apparatus is telling me it cannot write to the settings file or the config directory, what can I do?
Make sure that the user your server is running as has write access to the config directory and the settings.app file. If the settings.app file cannot be created automatically, create it manually and make sure PHP can write to it.
I keep getting 404 errors after hitting the Run… button. Why?
Check your code for an infinite loop or an infinite recursion. These problems sometimes present themselves as a 404 error (or 5## error) and unfortunately nothing (as far as I’m aware) can be done about this.
Why do some fatal errors in my code crash the script rather than being reported like most errors?
Unfortunately, the current implementation cannot capture and report fatal errors. Some fatal errors can be anticipated and reported prior to execution (using advanced error checking), but some fatal errors will still cause the script to crash. Just hit the back button, fix the error, and try again.
How do I report bugs or make a suggestion?
Leave a comment here or if you prefer, email me.
Change Log
- 0.4.0 (Current) – Added the Apparatus theme, incorporated the latest version of tab override, several bug fixes, modifications, and improvements
- 0.3.0 – Bug fixes, introduced settings, several modifications and improvements.
- 0.2.2 – Make generating the source code table a theme component rather than a core component.
- 0.2.1 – Improved template logic, fixed a false-positive with advanced error checking
- 0.2 – Initial Beta Release
- 0.1 – Alpha/Development version





That’s awesome
I like that you put on the syntax highlighter and tab override. I’ll let you know if I find anything that’s broken or make it do something cool.
I’m going to play with this script a bit. I was doing something like this with a textarea and a self posting script, but you’ve gone and put all kinds of fancy into it. That is just really cool
Thank you.
Pingback: Apparatus 0.4 | Tinsology