I don't know if you like the type of its indentation, but try the editor
Vim! It is an improved version of the old editor vi, and it supports automatic indentation. If you want to indent an existing file, open it:
$ vim filename
Then type (
including the colon):
:setf php
-- or --
:setf html
and do the job with 'gg=GZZ' (without colon and without quotes). This will indent the file, save and exit.
Hope I could help!