Updated: Refactor template operator to php function argument processing to solve fatal errors