getSource()->name}:\${$var} ="; $output .= $ptr->hasVariable($var) ? preg_replace('/\s/', '', var_export($ptr->getValue($var), true)) : '>unassigned<'; $ptr = $ptr->parent; } elseif (in_array('data', $types) && !($ptr instanceof Template || $ptr instanceof \Smarty\Smarty)) { $output .= "#data:\${$var} ="; $output .= $ptr->hasVariable($var) ? preg_replace('/\s/', '', var_export($ptr->getValue($var), true)) : '>unassigned<'; $ptr = $ptr->parent; } else { $ptr = null; } } if (in_array('global', $types)) { $output .= "#global:\${$var} ="; $output .= $template->getSmarty()->hasVariable($var) ? preg_replace('/\s/', '', var_export($template->getSmarty()->getValue($var), true)) : '>unassigned<'; } return $output; }