Render blocks of HTML with Twig macro and arguments

Code
<?php

$path 
__DIR__ '/templates/';

$template = <<<ND
{% extends "base.html.twig" %}

{% block body %}
    <h5>First macro call</h5>
    {{ _self.foo(1) }}
    <h5>Second macro call</h5>
    {{ _self.foo(2, "Free ElePHPants") }}
{% endblock %}

{% macro foo(number, optional) %}
    Content no. {{ number }} -
    {{ optional|default("No optional addition") }}
{% endmacro %}
ND;
$name 'macro.html.twig';

$loaders = [
    new 
Twig_Loader_Array([$name => $template]),
    new 
Twig_Loader_Filesystem($path),
];
$loader = new Twig_Loader_Chain($loaders);

$twig = new Twig_Environment($loader);

echo 
$twig->render($name);
Result

This is the Twig base template


The embedded template:

First macro call

Content no. 1 -
No optional addition

Second macro call

Content no. 2 -
Free ElePHPants

Used Versions
PHP 7.1, Zend 3.0, Symfony 3.2, Laravel 5.2, PHPUnit 5.6, Doctrine 2.6