ODPHPTools for Xcode

Using Apple’s Xcode to develop websites with PHP unfortunately is a bit, well let’s say spartan. There are of course other development tools more tailored towards PHP - also for the Mac. But Xcode is a very fine development tool, so why not try to make it a bit more comfy also for PHP developers?

Features

PHP system function lookup

  • Type the first few characters of a PHP system function into your source code
  • Call the Lookup PHP Function command of ODPHPTools
  • A panel pops up, listing matching PHP functions including parameters
  • Type in some more characters to narrow the search
  • Press Enter and the function including text markers for each parameter will be inserted
  • Use Xcode’s Select Next Placeholder command to jump to each marker

You can also call Lookup PHP Function without typing anything into your source - it will then list all functions and you narrow the list by starting typing...

PHP help lookup

  • Place the text cursor in or right behind a PHP function name
    (or select the function name)
  • Call the Search PHP Help command of ODPHPTools
  • A browser window opens, showing the help page for this PHP function (using the URL http://www.php.net/functionname)

Download

ODPHPTools Xcode plugin, version 1.4
ODPHPTools.xcplugin.zip Download115 kB

Installation

After downloading and uncompressing the bundle (ODPHPTools.xcplugin) move it to

~/Library/Application Support/Developer/Shared/Xcode/Plug-ins

and (re-)start Xcode.

To install the plugin for all users, put it into

/Developer/Platforms/MacOSX.Platform/Developer/Library/Xcode/Plug-ins
(thx to Jean-Yves Terrien for that info)

You should then find two new menu items in Xcode’s Edit menu:

  • Lookup PHP Function
  • Search PHP Help

You can create custom keyboard shortcuts for these ODPHPTools commands in System Preferences > Keyboard and Mouse > Keyboard Shortcuts. Make sure to enter the menu titles exactly as listed above. You cannot use shortcuts already used by Xcode for other commands. You could for example choose Command-F9 and Command-F10.

System Requirements

  • Xcode 3.2 or newer