images/logo.png

1. Introduction

PHP_Reflect adds the ability to reverse-engineer classes, interfaces, functions, constants, namespaces and more.

Why PHP_Reflect is different to standard PHP5 Reflection API ?

With PHP5 Reflection API the code to analyze needs to be loaded and interpreted by the php interpreter, and in certain cases, this triggers fatal errors.

With PHP_Reflect you don’t have to trust in source code, because it will be parsed with tokenizer extension.

2. Overview

PHP_Reflect provides :

Ability to reverse-engineer classes
Ability to reverse-engineer interfaces
Ability to reverse-engineer functions
Ability to reverse-engineer constants
Ability to reverse-engineer namespaces
Ability to reverse-engineer includes
Ability to reverse-engineer globals variables

3. Documentation

The PHP_Reflect manual is available in a selection of formats. Pick a format from the table below to start downloading.

Language Single HTML file Many HTML files HTML Help file PDF file

English

userguide.zip 6 Kb

userguide.chunked.zip 42 Kb

userguide.chm.zip 46 Kb

userguide.pdf 70 Kb

4. Appendix A: Classes Source Code

Below you can find highlighted PHP source code (with Pygments) of PHP_Reflect classes version 1.0.2

5. Appendix B: Examples

Scan a simple file

6. Appendix C: Changelog

History of changes

7. Appendix D: License

Released under the BSD license, you are free to do whatever you want, even in a commercial environment. You are also encouraged to contribute.

8. Appendix E: Credits

Sebastian Bergmann

Original author of PHPUnit/PHP_Token_Stream, that show me the way with his base concept to produce an extendable package .

https://github.com/sebastianbergmann/

All pages of this site, and user guide were generated with AsciiDoc 8.6.5, assisted by FOP 1.0 (for PDFs). Automated build process uses Phing 2.4.5

Convert the HTML Help source (.hhp and .html) files to HTML Help (.chm) files using the Microsoft HTML Help Compiler.