Yes, well that'll work, but there is a better way. Under MacOS X, you're better off not modifying Apache's main httpd.conf (as you're doing in the "script" you cite), but rather adding AddType application/x-httpd-php .php line in a separate file stored in /private/etc/httpd/users/
Notice the last line of Apple's standard httpd.conf file:
Include /private/etc/httpd/users
That appends every file in the directory /private/etc/httpd/users/, in alphabetical order, to your /etc/httpd/httpd.conf file. So if you place a file containing only the customizations you would otherwise make to /etc/httpd/httpd.conf in the directory /private/etc/httpd/users/, your customizations will always be in effect without ever modifying your /etc/httpd/httpd.conf file, and they won't break with various system updates.