"The trick here is to use one of the methods inside the smarty class which is a wrapper around eval (). function _eval ($code, $params = null) {return eval ($code);} While this function does only define two parameters in its signature it is possible to call this function with more than two parameters."