protected function compileDebugInfo(Twig_Compiler $compiler) { $compiler->write("public function getDebugInfo()\n", "{\n")->indent()->write(sprintf("return %s;\n", str_replace("\n", '', var_export(array_reverse($compiler->getDebugInfo(), true), true))))->outdent()->write("}\n"); }