The default way of adding a php function works only if you have one parameter to this function. I suppose that's not the case for you. I'm afraid it means creating an extension to add this template.
Writing my own extension for this is no problem at all, actually I have done so already meanwhile. I just was wondering whether there is a way to do it using existing eZfunctions as I don't want to add more custom code than necessary.
You can add php functions as template function from within the template.ini.append
[PHP]
# A list with php functions and their equivelant template operator names
# Giving the operators a different name from the PHP functions
# are recommended, that way you ensure that all operators follow
# the same naming guidelines. It also means that you can change the
# php function later on without doing template changes.
PHPOperatorList[]
PHPOperatorList[urlencode]=urlencode
The only problem is that you can then only use them as $blabla|urlencode() . If the php function you plan to use needs more than one parameter, then you need to write an extension.