PHP code example of anwarachilles / php-tracer

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

    

anwarachilles / php-tracer example snippets




// load vendor
arAchilles\PHPTracer;

// data sample
$string = "Hello World";
$array = ["Hello", "World"];
$boolean = true;
$integer = 123;
$float = 1.23;
$object = new stdClass();

class Person {
  private $name;
  protected $age;
  public $gender;
}
$object_in_class = new Person;

// init class
$trace = new PHPTracer();
// run tracer
$trace->run([
  $string,
  $array,
  $boolean,
  $integer,
  $float,
  $object,
  $object_in_class
]);
bash
composer