1. Go to this page and download the library: Download hazardland/debug 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/ */
hazardland / debug example snippets
class test1
{
public $string = "Test string";
public $boolean = true;
public $integer = 17;
public $float = 9.99;
public $array = array ('bob'=>'alice',true=>false,1=>5,2=>1.4);
public $object;
}
class test2
{
public $another;
}
class test3
{
public $string1 = "3d level";
public $string2 = "123";
public $complicated;
}
class test4
{
public $enough = "Level 4";
public $something = "Thanks for the fish!";
}
$test = new test1 ();
$test->object = new test2();
$test->object->another = new test3 ();
$test->object->another->complicated = new test4 ();
debug ($test);
debug ($test, true);
$pi = 3.14159265359;
debug ($pi, "hello this is pi");
$hm = array (1=>array(2=>array(3=>array(4=>array(5=>array(6=>array(7=>array(8=>"Last depth we created"))))))));
debug ($hm, "* A very complicated expanded array");
debug ($hm, "* More levels", false, 10);
debug ($test, "Output something as plain text", true);