alphabetus/var-dumper

Basic var dump into file

1.0.2 2020-12-17 18:38 UTC

This package is auto-updated.

Last update: 2024-04-26 04:55:51 UTC


README

This package provides a simple var_dumper that allows you to transcript variables into file.
It generates the file /var/alpha-dump/dump.txt with the contents of given var.

1. Basic Usage
  1. $ composer require alphabetus/var-dumper

  2. The static method ::log() can be used with 1 or 2 parameters:
    • ::log($var) - Logs only the last call of the dump and deletes older entries.
    • ::log($var, $keep_log_boolean) - if true, cumulates dumper calls in the same file.
Follow the example below
<?php 

namespace App\Module;

use AlphaLogger\Logger as Logger;

class YourClass
{
    public function foo()
    {
        $var = ...
        Logger::log($var, [$cumulate_log]);
    }
}