marcuwynu23/php-inspector 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

marcuwynu23/php-inspector

最新稳定版本:v1.0.2

Composer 安装命令:

composer require marcuwynu23/php-inspector

包简介

A PHP-friendly developer tool for logging and inspecting PHP classes, objects, and data structures.

README 文档

README

PHP Inspector

Stars Badge Forks Badge Issues Badge License Badge

A PHP-friendly developer tool for logging and inspecting PHP classes, objects, and data structures.

Features

  • Log detailed information about a class or object:
    • Class name and parent
    • Interfaces and traits
    • Constants, methods, and properties
  • Pretty-printed JSON output for easier debugging
  • Can handle objects, classes, arrays, and primitives
  • Simple integration with Laravel's logging system (or standard output)

Installation

Install via Composer:

composer require marcuwynu23/php-inspector

For developrnent and testing:

composer require --dev phpunit/phpunit

Usage

Log a Class

use Marcuwynu23\PHPInspector\PHPInspector;

PHPInspector::log(\DateTime::class);

Log an Object

$obj = new stdClass();
$obj->foo = 'bar';

PHPInspector::log($obj);

Log an Array or Primitive

PHPInspector::log(['foo' => 'bar']);
PHPInspector::log('Hello World');

All output will be printed in JSON format to stdout (or Laravel log if used in Laravel).

Running Tests

This library uses PHPUnit 10 for testing. Run tests using Composer.

composer test

This will execute:

vendor\bin\phpunit.bat --colors=always

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-11-04