This wasn’t as simple as it should have been. On windows, there are some gotchas.
1. Install PEAR if you haven’t already. In your PHP installation directory, there’s a batch file named “go-pear.bat”. Double click that. Let it add PEAR to your PATH (just say “yes” to everything).
2. Install PHP Beautifier. You don’t need to download. Just open a command window and enter “pear install PHP_Beautifier” or “pear install PHP_Beautifier-0.1.15”. Now you’ll a new batch file in that directory named “php_beautifier.bat”
3. Add the formatter to Komodo. Edit > Preferences > Formatters. Click the green plus. Give it some name, and select PHP as the language. Select “Generic Command Line Formatter” from the dropdown. In the “executable” input, put the path to the beautifier batch, e.g., “C:\PHP\php_beatufier”. You can add options if you’d like, but it’ll work without them.
4. At this point, it should work, but it doesn’t. In php_beautifier.bat, it references the PHP executable something like “.\php.exe” – which looked a little too *nix-y to be good. Editting this line manually (in the bat itself) to reflect the correct path to the PHP executable did the trick, e.g., “C:\PHP\php.exe”.