Firefox is supposed to display html and xml files, but not script files. Based on the filename extension *.php files are not what Firefox does support.
It would be nice if Firefox would check if a local php file maybe had html contents, or maybe html contents with embedded php code, but I guess this would also have some unwanted side effects.
Right now you have to change the extension from *.php to *.html.
Dillo does open *.php files immediately - if it's a real PHP script, then it is displayed as a text file.
KDE Programs Naming Convention