PHPackages                             xakki/reflection-info - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. xakki/reflection-info

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

xakki/reflection-info
=====================

PHP - Reflection information from object

1.1(9mo ago)01MITPHPPHP ^8.0

Since Aug 14Pushed 9mo agoCompare

[ Source](https://github.com/Xakki/reflection-info)[ Packagist](https://packagist.org/packages/xakki/reflection-info)[ RSS](/packages/xakki-reflection-info/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (4)Used By (0)

Reflection Info
===============

[](#reflection-info)

[![Latest Stable Version](https://camo.githubusercontent.com/a79ef83790b098c72a545e32cc9f188f274b5265a32e1a7b9246bce6476399ce/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f78616b6b692f7265666c656374696f6e2d696e666f2e737667)](https://packagist.org/packages/xakki/reflection-info)[![Total Downloads](https://camo.githubusercontent.com/1c9611066f1085d075530dc426497bd51cb83c439a3b7e8434d25ff5b2c740cf/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f78616b6b692f7265666c656374696f6e2d696e666f2e737667)](https://packagist.org/packages/xakki/reflection-info)[![License](https://camo.githubusercontent.com/fa521a98b60d21a25dcc9841114f81d775a028092826a9f33791decf081c170b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f78616b6b692f7265666c656374696f6e2d696e666f2e737667)](https://packagist.org/packages/xakki/reflection-info)

A PHP library for deep, recursive analysis of variables, objects, and classes using reflection. It provides a structured and detailed view of your data, making it ideal for debugging, logging, and serialization tasks.

Features
--------

[](#features)

- **Recursive Analysis**: Traverses nested objects and arrays to build a complete data tree.
- **Circular Reference Protection**: Detects and handles recursion to prevent infinite loops.
- **Depth Control**: Allows you to set a maximum depth for the analysis to manage performance and output size.
- **Detailed Class Information**: Extracts class name, parent class, interfaces, traits, constants, file path, and doc comments.
- **Comprehensive Property Details**: Gathers property names, visibility, values, static status, and doc comments.
- **In-depth Method Analysis**: Retrieves method names, visibility, parameters (with types and default values), static/final/abstract status, and doc comments.
- **Structured DTOs**: Returns the analysis result as a clean and easy-to-navigate tree of Data Transfer Objects (DTOs).

Installation
------------

[](#installation)

Install the library using [Composer](https://getcomposer.org/):

```
composer require xakki/reflection-info
```

Usage
-----

[](#usage)

Using the library is straightforward. Instantiate the `Analyzer` and pass the variable you want to inspect to the `analyze()` method.

```
