25.09.2014 Views

ZEND PHP 5 Certification STUDY GUIDE

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

134 ” Object Oriented Programming in <strong>PHP</strong><br />

Reflection<br />

With <strong>PHP</strong>’s new object model comes the Reflection API a collection of functions and<br />

objects that allows you to examine the contents of a script’s code, such as functions<br />

and objects, at runtime.<br />

Reflection can be very handy in a number of circumstances; for example, it can be<br />

used to generate simple documentation, or for determining whether certain functionality<br />

is available to a script, and so on. Here’s an example:<br />

<br />

Documentation<br />

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!