PHP Function Reference

Overview
FAQ
Version History
License

PHP Function Reference (PHPfr) lets you quickly look up function definitions using a downloaded copy of the online documentation from PHP.net.

PHPfr also includes an extensive cheat sheet of common PHP syntax and variables as well as an interactive date formatter.

PHPfr is inspired by the venerable shareware app, PHP Function Index, written by Wolfgang Ante of ARTIS Software. I paid for my copy of PHPfi long ago, but thought it would be even more convenient to have similar functionality in widget form.

If you agree, consider donating a few dollars. This will encourage me to continue improving PHPfr as well as developing new widgets. Thanks!

I hope you enjoy PHPfr. Let me know if you have any suggestions or find any bugs.
Andrew

Below are answers to some (anticipated) frequently asked questions.

How do I use PHPfr?

Just enter part of a function name to narrow the list and click on the function whose definition you wish to view. The widget will automatically expand and display the defniition page. You can also double-click on a function name to visit the online version of the documentation.

Tip: The search field accepts regular expressions as input, allowing you to home in on groups of functions not otherwise easily searchable. For example, entering the expression ^.*[0-9]$ into the search field will return all functions that end with a number.

Click on the plus sign in the upper left of any function page to add it to your favorites. View your favorites by clicking the “favorites” link below the function list.

Two great features of PHPfr are the cheat sheet and interactive date formatter. Click on “cheat sheet” below the function list to view the extensive list of commonly used syntax and variables. Click on “dates” to enter the interactive date formatter. Enter a format string to view a preview of how the date will appear when processed by the PHP date() function.

How do I install new languages?

PHPfr ships with the English version of the PHP documentation, which is enabled by default. To install other languages, follow the steps below:

  1. Flip to the back the widget
  2. Click the name of the language you wish to install
  3. You will be sent to the PHP.net site to choose a mirror from which to download the documentation
  4. When it is finished downloading, uncompress the documentation by double-clicking on the file
  5. The manual will uncompress into a folder with a name like “php_manual_en” or “html”
  6. Rename the folder to the country code of the language (Note: the country code for Brazilian Portuguese is “pt_BR”)
  7. Control-click (or right-click) on the PHP Function Reference.wdgt bundle located in either ~/Library/Widgets or /Library/Widgets and choose “Show Package Contents”
  8. Open the “php_manual” folder and drag the folder for the new language into it
  9. Enter Dashboard
  10. The new language should be available for selection on the backside in the language list
  11. Select the language you would like to use by clicking its radio button in the language list on the back of the widget

Why doesn’t my new language preference work perfectly?

If you notice the function pages not displaying exactly right after you select a new language, you may have to reload the widget (cmd-r).

Why can’t I use Arabic or Hebrew?

Full documentation is not available for Arabic and Hebrew (despite being listed in the documentation list at PHP.net).

As compatible versions of the documentation becomes available, I will update PHPfr to work with them.

Why download the documentation?

In a word: speed. PHPfr uses a downloaded copy of PHP.net’s online documentation to enable faster access than is possible over a network connection. Also, by using downloaded documentation, you can access it when you are not online.

0.9.6.2b – February 24, 2007
Updated default (English) documentation to the most recent version on PHP.net (20 Feb, 2007).
0.9.6.1b – July 2, 2006
Fixed a minor bug that would prevent the widget from loading for the first-time user (because the language preference was not set).
0.9.6b – June 29, 2006
Mac OS X 10.4.7 changed the behavior of widget.system calls. Synchronous calls now break widgets, whereas before they were tolerated (though discouraged). In this version, I fixed my widget.system calls to be asynchronous.
0.9.5b – March 23, 2006
Added integrated version checking.
0.9.4b – March 20, 2006
With help from the dashboard-dev mailing list, I got the Chinese Cantonese, Chinese Traditional, and Romanian versions of the documentation working.
0.9.3b – March 20, 2006
Dashboard expects all input to be UTF-8. Some versions of the PHP documentation (Chinese Cantonese, Chinese Traditional, and Romanian) are encoded in other charsets. The fact these languages will not work is now documented in the FAQ.
Fixed language installation instructions in the FAQ.
0.9.2b – March 19, 2006
Actually fixed bug where English was not set as default language on first run.
0.9.1b – March 18, 2006
Fixed bug where English was not set as default language on first run.
0.9b – March 17, 2006
Initial preview release

The following are the terms under which PHPfr is released.

Wow, this is great? How much does it cost?

I decided not to charge for PHPfr. But you’re right, it is great, so I am asking that if you find it useful that you head on over to PayPal and deposit $5 US (or whatever you think PHPfr is worth) in my account. To make this as painless as possible, here’s a link.

Gosh, I hope so. I know the part about redistributing the PHP documentation is kosher, because the copyright notice says so. It’s very possible that it’s more fun than the government wants you to have. I am in no way liable if you suffer any losses due to having too much fun. Actually, I am in no way liable for any losses you may suffer for any reason, related to this widget or not.

Copyright © 1997 – 2006 by the PHP Documentation Group. This material may be distributed only subject to the terms and conditions set forth in the Open Publication License, v1.0 or later (the latest version is presently available at http://www.opencontent.org/openpub/).