anwarachilles/php-tracer

php error & data tracking tools

1.0.2 2023-08-28 12:40 UTC

This package is auto-updated.

Last update: 2024-05-04 12:11:39 UTC


README

simple PHP data tracking tools

Installation

Install php-tracer with composer

composer require anwarachilles/php-tracer

Usage/Examples

<?php

// load vendor
require_once "vendor/autoload.php";
// load class
use AnwarAchilles\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
]);

License

MIT License