How can I associate a file extension with a content type?
The Alternative to the Solution mentioned by Gerry is the RCDefaultApp Preference Pane. It's free and let's you set all Application->Content Type, Application->URL connection on your System.

In the "Apps" Pane of RCDefaultApp you can set what file Types a specific Applications Supports when you check "php" with your Editor it will also show in the "Open With" Menu.