The Artima Developer Community
Sponsored Link

Web Buzz Forum
PHP Function Quick Reference

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Douglas Clifton

Posts: 861
Nickname: dwclifton
Registered: May, 2005

Douglas Clifton is a freelance Web programmer and writer
PHP Function Quick Reference Posted: Jan 1, 2006 3:43 PM
Reply to this message Reply

This post originated from an RSS feed registered with Web Buzz by Douglas Clifton.
Original Post: PHP Function Quick Reference
Feed Title: blogZero
Feed URL: http://loadaveragezero.com/app/s9y/index.php?/feeds/index.rss1
Feed Description: Web Development News, Culture and Opinion
Latest Web Buzz Posts
Latest Web Buzz Posts by Douglas Clifton
Latest Posts From blogZero

Advertisement

devboi Before I started writing PHP, I was a Perl man. One of the first things that struck me about the PHP language was its monolithic nature. Perl tends to be compact, terse even. Yet it is highly extensible and has a huge repository (CPAN) of third party modules.

PHP has many of these features built-in. Another often-cited criticism, and one I happen to agree with, is the inconsistent naming of functions, the ordering of parameter lists and the return values from these functions. Thankfully, PHP.net has excellent documentation, including many user-contributed notes, examples and other comments. The key is to quickly access this documentation, which I find is invaluable to my productivity.

One tool that helps me is the DevBoi Firefox extension. Once installed, you will also want to install the PHP addon package. Now either access DevBoi from the Tools menu, or press Ctrl+F9 (Linux/Windows). This will load DevBoi in the sidebar of the browser, and if the PHP package isn't already selected, do so from the dropdown list. This will present you with an exhaustive, alphabetically sorted list of all the PHP functions. Double click on one to bring up that function's documentation in the current browser tab window. Some hints: Ctrl+Click on the function will open it in a new tab, pressing any character will bring up the list of function names at that point in the list (b => base64_decode()). There are probably some other tricks that I'm missing—read the documentation. Bonus: Along with quick access to the PHP function reference, DevBoi includes HTML 4.01/XHTML 1.0, CSS 2.1, Javascript 1.3 and DOM 2. Additional addon packages include Ruby on Rails, XUL and there are more on the way.

Another great tip for quickly accessing the PHP documentation is to create a Firefox Quick Search bookmark and assign it to a keyword. The one I set-up is utter simplicity:

Name:        PHP
Location:    http://www.php.net/%s
Keyword:     php
Description: Search PHP.net

dialog

From Firefox hit Alt+D (or Opt+D under Mac OS X) to give focus to the Location bar, then type php <function_name> and it will take you directly to the documentation for that function. This is a great tip for all sorts of quick searches, especially if you are comfortable using the keyboard rather than always reaching for that mouse. I have a number of 1-3 character keyword quick searches I use all the time for MySQL, Google, Yahoo, Feed Validator, del.icio.us, Wikipedia and so on.

I have never been a big fan of IDEs, although many commercial and shareware packages offer quick reference features for whatever language you happen to be developing in. Fans of the Vim editor might be interested in something similar. If this includes you, check out phpm and this article by Tobias Schlitt which explains how you can configure phpm to access the reference to the PHP function under your cursor with one keytroke.

If you prefer something printed and handy on your desk, have a look at Dave Child's PHP Cheat Sheet, available in both PNG and PDF formats. There are a number other versions of this idea available around the Web.
cheatsheet

Have a happy and productive New Year! Your tips and suggestions are always welcome.

Read: PHP Function Quick Reference

Topic: Is It Important That Users Kick Ass? Previous Topic   Next Topic Topic: TinyMCE Javascript Content Editor by Moxiecode Systems AB

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use