What Is PHP Reflect

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.

Features

Modern

Reflect takes advantage of new features in PHP 5.3.0 or greater.

Robust

Reflect is strictly tested. Checks code coverage and see by yourself.

Reflection API

Reflect comes with a complete reflection API almost equivalent to PHP5 reflection.

Solid Foundation

Whenever possible wheel reinvention was avoided. Reflect uses code from well-known projects including Symfony Finder, and EventDispatcher.

Extensible

Supported token parser is not enough for you ? Create your own. It is really simple!

Documentation

All documentation are available online and for download in several formats.

Offline Reading

The Reflect book is available in a selection of formats. You can download the documentation for offline reading.

Formats Download links

Single HTML file

phpreflect-book.html.zip

Many HTML files

phpreflect-book.chunked.zip

HTML Help file

phpreflect-book.chm.zip

PDF A4 file

phpreflect-book-a4.pdf

PDF US file

phpreflect-book-us.pdf

EPUB file

phpreflect-book.epub.zip

License

Reflect is open-source software.

BSD License

The full legal text of the BSD 3-clause license is given below.

 Copyright (c) 2011-2013, Laurent Laville <pear@laurent-laville.org>

 Credits to Sebastian Bergmann on base concept from phpunit/PHP_Token_Stream

 All rights reserved.

 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions
 are met:

     * Redistributions of source code must retain the above copyright
       notice, this list of conditions and the following disclaimer.
     * Redistributions in binary form must reproduce the above copyright
       notice, this list of conditions and the following disclaimer in the
       documentation and/or other materials provided with the distribution.
     * Neither the name of the authors nor the names of its contributors
       may be used to endorse or promote products derived from this software
       without specific prior written permission.

 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
 BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 POSSIBILITY OF SUCH DAMAGE.

What is next

Warning First visit, you are highly recommended to follow chapters in order.
Setup

Configuring your project and get ready for your first parsing.

Quick Start

This quick start is a five minute tutorial where you can discover how to identify a data source and parse its contents.

Handle Results

Learn how to explore and exploit parsing results.

Concrete Examples

Discover how Reflect may be use in real condition.