PHP documentation browser

Even though I have my vacation right now I need to hack some ;)
What I have done is a PHP documentation browser, I simply call it PHPDoc Browser, for GNU/Linux to read the PHP documentation locally on the computer (it’s a little bit like CHM for Windows). This little app isn’t that necessary but I thought it was a great thing for learning new stuff: The application is written in Mono/C# and uses SQLite for storing the search index.

Difference from CHM

Although there’s a CHM equivalent, XCHM, for Unix like systems I decided that my application serves a purpose: What I like about the PHP manual is that you can hit in you browser and you will get the documentation for “the_function”. Of course I implemented the same functionality in PHPDoc Browser. You can also do a wild card search like “array_*” and you will get a list of all “array_*” functions.

I also implemented a free text search but that’s not “a real” FTS at the moment. FTS in SQLite in a little bit harder than in MySQL so while awaiting the next SQLite version the FTS is a bit of a hack. But you can quote the search to narrow it down ;)

What’s learned?

Most of the unnecessary stuff I do I do to learn and the PHPDoc Browser is no exception. I learned how to use SQLite in Mono/C# and I also wrote a self contained installer in Bash, and Bash I havn’t really touch although I’ve been using GNU/Linux for 6-7 years! I found it quite fun writing the installer :)


If you would like to try it out:

  1. Download the install script
  2. Un-tar it (`tar zxvf phpdocbrowser-installer.tgz`)
  3. Make sure the script is executable (`chmod +x phpdocbrowser-installer`)
  4. Open a console and run the installer: ./phpdocbrowser-installer
  5. Answer the questions and you’r ready to go.

The script will create a directory, ./phpdocbrowser-installer, in your home directory in wich you will find ./phpdocbrowser-installer, ./phpdocbrowser-installer and a directory, ./phpdocbrowser-installer, with the PHP documentation. A “run script” will also be installed either in ./phpdocbrowser-installer or in your home directory depending on how you answered the questions and if you agreed to create a desktop shortcut one will hopefully appear on your desktop (havn’t tested this on KDE but it should work fine in Gnome).

To run the application hit the desktop shortcut, if one was created, or invoke ./phpdocbrowser-installer from a console.

If you wish to remove the PHPDoc Browser run the following from a console:

And that’s that!


PHPDoc Browser 17:31, Sat 17 October 2009 :: 8.9 MB

Screen shots