承接 martinlindhe/php-debughelper 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

martinlindhe/php-debughelper

最新稳定版本:0.1.17

Composer 安装命令:

composer require martinlindhe/php-debughelper

包简介

README 文档

README

Build Status https://packagist.org/packages/martinlindhe/php-debughelper

Installation

With Composer

composer require martinlindhe/php-debughelper

or add manually to composer.json:

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

HexPrinter

use DebugHelper\HexPrinter;

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

will output something like

000000: f0 ff 00                                         ...

BinaryPrinter

use DebugHelper\BinaryPrinter;

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

will output something like

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

统计信息

  • 总下载量: 354
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 0
  • 依赖项目数: 6
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-03-16