Parsing a PHP file



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 realize that I could do some regular expressions
and hope for the best, but my ideal solution has no chance of
misfiring (e.g. capturing something in a comment or string, or missing
something because it's on multiple lines).

My idea at the moment is to pick apart something like Doxygen or GeSHi
and figure out some simple file parsing, but I think that's pretty
involved for my aims here. Does anyone have a suggestion?

Regards,
Ryan Govostes

.



Relevant Pages

  • Re: Calling a function within a Post Form
    ... functions in the same php file that trigger different functions). ... The action parameter can specify the URL of the PHP script that contains ... parameters in the hidden input fields of the form. ...
    (alt.php)
  • Re: Calling a function within a Post Form
    ... I need to call a function upon POSTing a form (there are multiple ... functions in the same php file that trigger different functions). ... The action parameter can specify the URL of the PHP script that contains ...
    (alt.php)
  • Re: Problems with if statement
    ... mantrid wrote: ... I have used the following php script in the form action to determine whether ... to post the same page again or open the php file called excelsave.php ...
    (comp.lang.php)
  • Re: Hiding database connection info
    ... In a php script, I have to connect to a remote mysql database. ... worried that some user might be bale to retrieve the source of the page ... make sure your include file is a .php file. ...
    (comp.lang.php)