|
Posted by Rami Elomaa on 05/01/07 04:19
Ryan Govostes kirjoitti:
> In my PHP script, I'd like to examine another PHP file to get
> information on the classes it will define before I include it
> (alternatively, getting a list of the classes after I've included it
> would be fine too).
I'm curious, what would you do with this info?
Anyway, as you said, there is get_defined_classes and I think what you
are trying might be accomplished thusly:
$before = get_defined_classes();
include('file.inc.php');
$declared = array_diff(get_defined_classes(), $before);
print_r($declared);
--
Rami.Elomaa@gmail.com
"Wikipedia on vähän niinq internetin raamattu, kukaan ei pohjimmiltaan
usko siihen ja kukaan ei tiedä mikä pitää paikkansa." -- z00ze
[Back to original message]
|