Add functions for working with PHP template files