Jonah suggested that I look into runkit_import, however that won't be an option for my project.
I need a suggestion if one is available for including PHP files, reading the classes and methods inside them and if name collisions come up overwrite them. Basically, I don't want to have to create a batch file that executes my parsing script for each file. I will, because I'd prefer to avoid having to parse every file myself... that's just a lot of regex (I was going to write a recursive regex funtion that would gut each class). I'd prefer to load classes, reflect them and introspect their methods, variables, etc using the reflection class.
After going over the PHP.net manual I don't see anything that states include will overwrite any existing classes with the same name. I could be missing something, I'm pretty tired today. To be honest I'd love to find a way to include a PHP file, then completely remove it from memory including all classes it contained. Having a clean get_declared_classes() return for each file (aside from predefined extensions) would be ideal. Though I've been known to try to break things, and I'm guessing the only clean way of doing this is to execute the script in a batch setting. This would probably be best because I'll be comparing the predefined classes to the included classes and only reading the non-predefined.
If this doesn't make any sense, I apologize. I'm so tired.