4 years ago I wrote a small program called phpm that I used for php function lookup when coding in vim. since then I’ve crossed over to ZendStudio and I’m now using that for my everyday work. But: every now and then I’ve had requests regarding phpm and if I can’t digg up the sources, and I’ve said: “sorry, but those are lost”. Until today: I went through a old HD, digging through backups and files: and suddenly phpm resurfaced!

So, today I can put the sources up here again if you still are interested. I’m not going to develop any further on it, so if someone wants to continue the development on it: please contact me on this blogpost.

The files:
* phpm
* the xml files – you need these too
* optional phpdocumentor template that will generate a xml file from your project

Remember that the xml files from the projects included in the xml package are old, and is there now only for a reference on how the program is set up. I’m not sure if the generate.php script will actually generate a correct php.xml file since there might have been changes in the documentation process the last 4 years.

I have tested the script out and it is still working, so there you go: a little new years present from my good old backup HD to you 🙂 Let me know how it works out for you.

10 comments to “phpm”

You can leave a reply or Trackback this post.
  1. Yay!!!!

  2. Woohu …! nice one.!

  3. Everybody reading this might be interested in

  4. Hello.
    I find one error;
    Fatal error: Call to undefined method SplFileInfo::getChildren() in /home/sampeng/web/web/phpm/lib/epc/phpm/parser.php on line 69
    ok,let me see this.
    $dir = new RecursiveDirectoryIterator( $this->settings->cvsdir );
    foreach( $dir as $file )
    echo “>>Processing: $file\n”;
    if( $file->isDir() && $file->getFileName() != “CVS” )
    foreach( $file->getChildren() as $f )
    if( $f->getFileName() == “functions” )
    $this->processDirectory( $f->getChildren() );

    I am look for SPL API.Not Find DirectoryIterator has getChildren function.but,
    you write
    private function processFile( DirectoryIterator $file )
    🙂 how to call this function?
    And .
    $dir = new RecursiveDirectoryIterator( $this->settings->cvsdir );
    This will create SplFillInfo in the foreach loop.SplFileInfo object have not getChildren function….so…I think this script don’t working for me.
    how to amend this wrong?I don’t know what are you think….Why you can run this?I am so inquisitiveness.
    I hope you can email for me. English so poor! 🙂

  5. SamPeng: what version of php are you running? I wrote this a long time ago so I assume something have changed since then.

  6. Very well written post however, I would recommend that you turn the No Follow off in your comment section.

    Keep up the good work.

  7. Thanks for this HÃ¥vard. Sadly I found this post after I had mended the code myself – I had SamPeng’s problem above. If it is of use to anyone, you can find the article I’ve written on my blog and my fix of the parser on github/jdvalentine

  8. Looks like something is wrong with this code for 5.2.17 and 5.3.5. Maybe the method is deprecated or something. I thought Id mention it. Would be cool to know what version phpm was written on.

    PHP Fatal error: Call to undefined method SplFileInfo::getChildren() in /home/bryan.ruiz/phpm/lib/epc/phpm/parser.php on line 69

Write a Reply or Comment

Your email address will not be published.