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;
use DecodeLabs\Monarch;

$glitch = Monarch::getService(Glitch::class);
$glitch->dump('hello');

$glitch->registerAsErrorHandler();

$glitch->setStartTime(microtime(true));

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

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

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

$glitch->getRenderer()->setCustomCssFile('path/to/my/file.css');