PHP Classes

PHP Web Console: Execute PHP commands on a console Web page

Recommend this page to a friend!
  Info   View files Example   Screenshots Screenshots   View files View files (3)   DownloadInstall with Composer Download .zip   Reputation   Support forum (2)   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 267 All time: 7,748 This week: 488Up
Version License PHP version Categories
php-web-console 1.0Public Domain5.4HTML, PHP 5, Debug, Logging


This class can Execute PHP commands on a console web page inspired by the Chromium JavaScript console.

It can execute given PHP code and other console commands and stores HTML to display the results on session variables.

The class can output the responses of the requested console commands as response to AJAX requests that update the current page with the commands output for the users to see on the web page.

The other console commands that it supports are log to display an arbitrary message, alert to display a message in an alert dialog on the browser, backtrace to show the function call backtrace.

Picture of Matthew Knowlton
  Performance   Level  
Name: Matthew Knowlton is available for providing paid consulting. Contact Matthew Knowlton .
Classes: 6 packages by
Country: United States United States
Age: 28
All time rank: 2036290 in United States United States
Week rank: 280 Up28 in United States United States Up
Innovation award
Innovation award
Nominee: 4x

Winner: 1x



$_POST['command']) && $_POST['command'] != ''){

<script src=""></script>
        if($('#command').val() == '') return;
        $.post('console.example1.php',{'command': $('#command').val()},function(r){
        $.post('console.example1.php',{'command': 'exit();'},function(r){
            $('#command, #submit, #stop').hide();

    <input id="command" name="command"/>
    <button id="submit">Submit</button>
    <button id="stop">Stop</button>
    <button id="restart" style="display:none;">Start</button>


  • PHPConsole.jpg
  Files folder image Files  
File Role Description
Plain text file PHPConsole.class.php Class PHPConsole Class
Accessible without login Plain text file console.example1.php Example Example of a PHP console setup
Accessible without login Plain text file console.example2.php Example Example of PHPConsole being used for logging by an separate script.

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:7,748
This week:488Up