2017 © Pedro Peláez
 

library php-debughelper

image

martinlindhe/php-debughelper

  • Monday, August 3, 2015
  • by martinlindhe
  • Repository
  • 1 Watchers
  • 2 Stars
  • 254 Installations
  • PHP
  • 6 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 19 Versions
  • 0 % Grown

The README.md

About

Build Status https://packagist.org/packages/martinlindhe/php-debughelper, (*1)

Installation

With Composer, (*2)

composer require martinlindhe/php-debughelper

or add manually to composer.json:, (*3)

{
    "require": {
        "martinlindhe/php-debughelper": "~0.1"
    }
}

HexPrinter

use DebugHelper\HexPrinter;

echo HexPrinter::render("\xF0\xFF\x00");

will output something like, (*4)

000000: f0 ff 00                                         ...

BinaryPrinter

use DebugHelper\BinaryPrinter;

echo BinaryPrinter::render("\xF0\xFF\x00");

will output something like, (*5)

000000: 11110000 11111111 00000000                 ...

Stopwatch

use DebugHelper\Stopwatch;

$watch = new Stopwatch;
$watch->start();
// do some heavy lifting ...
$watch->stop();

echo $watch->getElapsedTime()." seconds elapsed\n";

Logging

dbg($msg); // write to stdout if DEBUG=1
nfo($msg);
err($msg);

dbgTime($msg);
nfoTime($msg);
errTime($msg);

Helpers

d()       dumps variable, using symfony/var-dumper
dd()      dump and die
bt($ex = null)  prints a backtrace (optionally from exception)
dh()      shorthand for DebugHelper\HexPrinter::render()
dbits()   shorthand for DebugHelper\BinaryPrinter::render()
dm()      prints current memory usage
apcm()    prints memory usage by the apc extension

The Versions

03/08 2015

dev-master

9999999-dev

  Sources   Download

MIT

The Requires

 

The Development Requires

by Martin Lindhe

03/08 2015

0.1.17

0.1.17.0

  Sources   Download

MIT

The Requires

 

The Development Requires

by Martin Lindhe

04/07 2015

0.1.16

0.1.16.0

  Sources   Download

MIT

The Requires

 

The Development Requires

by Martin Lindhe

27/05 2015

0.1.15

0.1.15.0

  Sources   Download

MIT

The Requires

 

The Development Requires

by Martin Lindhe

18/05 2015

0.1.14

0.1.14.0

  Sources   Download

MIT

The Requires

 

The Development Requires

by Martin Lindhe

17/04 2015

0.1.13

0.1.13.0

  Sources   Download

MIT

The Requires

 

The Development Requires

by Martin Lindhe

15/04 2015

0.1.12

0.1.12.0

  Sources   Download

MIT

The Requires

 

The Development Requires

by Martin Lindhe

11/04 2015

0.1.11

0.1.11.0

  Sources   Download

MIT

The Requires

 

The Development Requires

by Martin Lindhe

11/04 2015

0.1.10

0.1.10.0

  Sources   Download

MIT

The Requires

 

The Development Requires

by Martin Lindhe

09/04 2015

0.1.9

0.1.9.0

  Sources   Download

MIT

The Requires

 

The Development Requires

by Martin Lindhe

05/04 2015

0.1.8

0.1.8.0

  Sources   Download

MIT

The Requires

 

The Development Requires

by Martin Lindhe

28/03 2015

0.1.7

0.1.7.0

  Sources   Download

MIT

The Requires

 

The Development Requires

by Martin Lindhe

23/03 2015

0.1.6

0.1.6.0

  Sources   Download

MIT

The Requires

 

The Development Requires

by Martin Lindhe

17/03 2015

0.1.5

0.1.5.0

  Sources   Download

MIT

The Requires

 

The Development Requires

by Martin Lindhe

17/03 2015

0.1.4

0.1.4.0

  Sources   Download

MIT

The Requires

 

by Martin Lindhe

17/03 2015

0.1.3

0.1.3.0

  Sources   Download

MIT

The Requires

 

by Martin Lindhe

17/03 2015

0.1.2

0.1.2.0

  Sources   Download

MIT

The Requires

 

by Martin Lindhe

16/03 2015

0.1.1

0.1.1.0

  Sources   Download

MIT

The Requires

 

by Martin Lindhe

16/03 2015

0.1.0

0.1.0.0

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

by Martin Lindhe