sincco/debug

Simple class for debug & logger on PHP

1.0.1 2016-11-23 20:06 UTC

This package is not auto-updated.

Last update: 2024-05-11 17:29:13 UTC


README

Simple class for debug & logger on PHP

##Installation

To add this package as a local, per-project dependency to your project, simply add a dependency on your project's composer.json file. Here is a minimal example of a composer.json file that just defines a dependency on Debug:

{
    "require": {
        "sincco/debug": "dev-master"
    }
}

##Use

Log any message / variable / data.

<?php
Debug::log( 'message', $var1, $var2, ... ); // log as much data as you want
Debug::dump( 'message', $var1, $var2, ... ); // log and exit

Use and display chrono.

<?php
Debug::chrono(); // set the timer
Debug::chrono('your message'); // display your message & time elapsed since last chrono call
Debug::chrono(true); // display a table with all messages & times

NOTICE OF LICENSE

This source file is subject to the Open Software License (OSL 3.0) that is available through the world-wide-web at this URL: http://opensource.org/licenses/osl-3.0.php

Happy coding!