PHP code example of trash07 / simple-php-debuging

1. Go to this page and download the library: Download trash07/simple-php-debuging 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/ */

    

trash07 / simple-php-debuging example snippets




$people = array('marc', 'john', 'liman');
// what is the structure of $people ?
_dump($people);

$info = array('marc', 'john', 1);
// readable $info array echo
_debug($people);

// simple stop
_stop();
// stop with message
_stop("Sorry we must stop");

$r = 10; $s = 11;
// test the condition of the if statement
_condition($r > $s && $r < $s);
if ($r > $s && $r < $s) {
    // do something ...
}

$r = 10; $s = 11;
// test the condition of the if statement with message
_condition($r > $s && $r < $s, "The $r, $s equality testing if");
if ($r > $s && $r < $s) {
    // do something ...
}

// simple test
_line();
// _line() with message
_line("Are we realy here ?");