PHP code example of projector22 / php-debuggin-tool

1. Go to this page and download the library: Download projector22/php-debuggin-tool library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

projector22 / php-debuggin-tool example snippets


function autoload( string $class ) {
    /**
     * EXAMPLE
     */
    $path = realpath( __DIR__ . '/examplePath/' );
    $tStatic` exists and call it if so.
     */
    if ( method_exists( $class, '__constructStatic' ) ) {
        $class::__constructStatic();
    }
}

Debug::$display->data( 'Example Data' );
Debug::$display->table( ['a' => 'b', 'c' => 'd'] );
Debug::$display->page_data();

Debug::$timer->start();
// Some code
Debug::$timer->timestamp( 'label' );
// Some code
Debug::$timer->timestamp( 'another label' );
// Some code
Debug::$timer->end( true );

Debug::$lorium->generate( 2 );

Debug::$cmd->show_output( 'ls' );

Debug::$js->detect_keystroke();

Debug::$log->to_file( 'Some Data' );
Debug::$log->to_file( ['key' => 'Some Data'] );
Debug::$log->to_file( 'SELECT * FROM table_name', 'sql.log' );