21 $isDumpOutputHtmlSafe = extension_loaded(
'xdebug')
23 && (
false === ini_get(
'xdebug.overload_var_dump') || ini_get(
'xdebug.overload_var_dump'))
26 && (
false === ini_get(
'html_errors') || ini_get(
'html_errors'))
27 ||
'cli' === php_sapi_name()
31 new Twig_SimpleFunction(
'dump',
'twig_var_dump', array(
'is_safe' => $isDumpOutputHtmlSafe ? array(
'html') : array(),
'needs_context' =>
true,
'needs_environment' =>
true)),
54 $count = func_num_args();
57 foreach ($context as $key => $value) {
65 for (
$i = 2;
$i < $count;
$i++) {
66 var_dump(func_get_arg(
$i));
70 return ob_get_clean();
getName()
Returns the name of the extension.
Represents a template function.
getFunctions()
Returns a list of global functions to add to the existing list.
isDebug()
Checks if debug mode is enabled.
Default base class for compiled templates.
Stores the Twig configuration.
twig_var_dump(Twig_Environment $env, $context)