add call_by_reference, update template/php_smarty_template.php