PHP code example of decodelabs / glitch

1. Go to this page and download the library: Download decodelabs/glitch 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/ */

    

decodelabs / glitch example snippets


use DecodeLabs\Glitch;

Glitch::dump('hello');

use DecodeLabs\Glitch;

Glitch::registerAsErrorHandler();

use DecodeLabs\Glitch;

Glitch::setStartTime(microtime(true));

use DecodeLabs\Glitch;

class MyThing {}
$myObject = new MyThing();

// This will dump the object and carry on
dump($myObject);

// This will dump the object and exit
dd($myObject);

use DecodeLabs\Glitch;

function myFunction() {
    // This will throw a Glitch exception
    Glitch::incomplete([
        'info' => 'some test info'
    ]);
}

use DecodeLabs\Glitch;

Glitch::getRenderer()->setCustomCssFile('path/to/my/file.css');