tags:

views:

72

answers:

3

I'm making the leap to OOP with my PHP. Is there a way to list all active classes and their methods and properties?

+2  A: 

Complete list of similar functions :)

Quick Look:

get_declared_classes() // gives you all declared classes
get_class_methods() // gives you all methods of class
get_class_vars() // gives you properties of the class
get_object_vars() // gives you propertis of an object
get_parent_class()  // gives you parent class of the current class
Sarfraz
+2  A: 

Also, you might be interested in the Reflection API offered by PHP.

As they claim in their introduction:

PHP 5 comes with a complete reflection API that adds the ability to reverse-engineer classes, interfaces, functions, methods and extensions. Additionally, the reflection API offers ways to retrieve doc comments for functions, classes and methods.

Roberto Aloi
reflection API is rather advanced for new users and has almost no documentation :(
Sarfraz
Well, this sounds like the perfect reason to start writing the doc for it.
Roberto Aloi