0

I would like to create a script that would open a php file and tell me it's content, but i want to know if there is a class in there and if so, what methods are there, what parameters are they waiting for, and so on and so forth.

So basically it would work a little bit like phpDocumentor, at least that is how i imagine it.

Could you please point me in to the right direction, i all ready googled it and of course i tried file_get_contents() but that didn't gave me the class.

Jørgen R
  • 10,568
  • 7
  • 42
  • 59
Mr. Sam
  • 790
  • 2
  • 9
  • 31

1 Answers1

1

http://www.php.net/manual/en/function.show-source.php may help you within php.


Not the same thing but;

also see http://xdebug.org/

and maybe http://pecl.php.net/package/xhprof

They might help you too.

Edit: By the way, phpDoc also shows the code.

Hilmi Erdem KEREN
  • 1,949
  • 20
  • 29
  • I really like the show_source function but how would i proceed to see analyze a class? – Mr. Sam Jan 22 '14 at 15:36
  • 1
    I think that Hilmi means to look at the source code of `show_source()` and `xdebug`, not to actually use that function or tool. – dotancohen Jan 22 '14 at 15:38
  • Ohh, ok, sorry my bad. Well thanks, i really think that these links are a good start. – Mr. Sam Jan 22 '14 at 15:40