定制 macino/pdbg 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

macino/pdbg

Composer 安装命令:

composer require macino/pdbg

包简介

PHP Debuging helper and benchmark tool

README 文档

README

Auhtor:Tomas Macik
Contact: tomas.macik@gmail.com

Contents

References

Instantination

pdbg(), Pdbg::getInst(), _p()

Returns singleton instance of pdbg class.

Logging and dumping

log(msg), l(msg)

Append a message from msg to log buffer with timestamp prefix.

point([desc]), p([desc])

Appends a check point message to log buffer. Description of check point will be added if present in desc.

dump(var[, desc]), d(var[, desc])

Append an exported variable to log buffer. var_export fce is used to get the exported content of variable. Description of dump will be added if present in desc.

hdump(var[, desc]), hd(var[, desc)

Same as dump, but with syntax highlight in html. Improves readability in browsers but it worsen it in console output.

hdigh()

As How Do I Get Here, prints a formatted backtrace to actual position including function itself. It does not dump the objects, only arguments of each function in trace.

Benchmarking

Pdbg can provide multiple benchmarks. Bench marks have their own buffer, so by ending the last started benchmark will be ended. Benchmarsk are messaured in microsecond precission.

bstart([desc]), bs([desc])

Starts a new bechmark and mark it to log buffer with description (default='-').

bench(), b()

Ends the last started benchmark and mark it to log buffer with message containing the duration of the benchmark in miliseconds units.

Flushing the buffer

flush(), fl()

Stops outputbuffer if present. Flushes the content of log buffer to stdout without any surrounding tags and dies. This is good for console debugging.

hflush(), hfl()

Same as flush(), but it uses htmlentities and <pre> tags to format output, so it would be more readable in html output.

fflush([append]), ffl([append])

Flushes the content of log buffer to file pdbg.log without any formatting. If append is true, the content will be appended to the file. Otherwise the file will be overwritten with new content.

macino/pdbg 适用场景与选型建议

macino/pdbg 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 6 次下载、GitHub Stars 达 0, 最近一次更新时间为 2025 年 02 月 13 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 macino/pdbg 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 macino/pdbg 我们能提供哪些服务?
定制开发 / 二次开发

基于 macino/pdbg 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-02-13