Permalink
Browse files

Merge pull request #18 from kriswallsmith/var-dump

switched debug tag from print_r to var_dump
  • Loading branch information...
2 parents 6b0cc16 + f4294a6 commit eba4f5d572bec05c72a47bbd73ba0a3330cf8f54 @fabpot fabpot committed Aug 18, 2011
Showing with 4 additions and 4 deletions.
  1. +2 −2 lib/Twig/Extensions/Node/Debug.php
  2. +2 −2 test/Twig/Tests/Node/DebugTest.php
@@ -51,11 +51,11 @@ public function compile(Twig_Compiler $compiler)
->write("}\n")
->outdent()
->write("}\n")
- ->write("print_r(\$vars);\n")
+ ->write("var_dump(\$vars);\n")
;
} else {
$compiler
- ->write("print_r(")
+ ->write("var_dump(")
->subcompile($this->getNode('expr'))
->raw(");\n")
;
@@ -47,7 +47,7 @@ public function getTests()
\$vars[\$key] = \$value;
}
}
- print_r(\$vars);
+ var_dump(\$vars);
}
EOF
);
@@ -57,7 +57,7 @@ public function getTests()
$tests[] = array($node, <<<EOF
if (\$this->env->isDebug()) {
- print_r((isset(\$context['foo']) ? \$context['foo'] : null));
+ var_dump((isset(\$context['foo']) ? \$context['foo'] : null));
}
EOF
);

0 comments on commit eba4f5d

Please sign in to comment.