Searching PHP.net using Chrome omnibox

Adding a omnibox shortcut to quickly search some site or language reference isn’t a hard task and it is discussed in thousand of blogs. However, by an accident I have found something better — an ultimate solution to PHP shit-littering and cretinism.

The shortcut

I’m using Chrome so I defined myself a search to PHP.net repository quickly accessible from omnibox (similar can be achieved in all modern browsers):

http://php.net/manual-lookup.php?pattern=%s&lang=en

I gave it a p shortcut, so now all I have to do is:

  • to enter p into omnibox (address bar)
  • hit Space
  • write function name, I’m looking for and
  • hit Enter

Just like that:

The pain…

The real problem was, that PHP is the most shitful language in the world and has function names both:

  • with underscore (i.e. is_file) and
  • without it (i.e. gettype)

And, as one of Murphy’s rules probably claims, most time I’m writing it incorrectly:

  • with underscore when I should omit it and
  • without it, if it is necessary

Today I accidentally found a solution even for this.

…and the solution

You can write function name’s parts separated with space and PHP.net search will handle that.

So, writing both:

  • p is file and
  • p get type

in Chrome omnibox will work and will lead you to correct manual page.

Leave a Reply