The dump function dumps information about a template variable. This is mostly useful to debug a template that does not behave as expected by introspecting its variables:
xxxxxxxxxx
twig = new \Twig\Environment($loader, [
'debug' => true,
// ...
]);
$twig->addExtension(new \Twig\Extension\DebugExtension());