When you right click on a file and select open with > Application, you go to the file types dialog. You know you're there when the window says Edit File Type. You can also get there by clicking Main Menu > Preferences > File Types and Programs, and then selecting the Software Development > Source Code > PHP script entry. Click edit and you're there.
Add the command you want to run to the bottom of the Edit File Type window and click OK.