I want to open a php file with a php extension in safari.

Launch safari and
File → Open file
I can select files with
Only extension html or txt can be selected,
If it is php, it cannot be selected. (It is dimmed and the file cannot be selected)

How can I display a php file on a browser?