Base Template
templates\base.html.twig
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>{% block title %}Welcome!{% endblock %}</title>
<link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 128 128%22><text y=%221.2em%22 font-size=%2296%22>⚫️</text></svg>">
{# Run `composer require symfony/webpack-encore-bundle` to start using Symfony UX #}
{% block stylesheets %}
{{ encore_entry_link_tags('app') }}
{% endblock %}
{% block javascripts %}
{{ encore_entry_script_tags('app') }}
{% endblock %}
</head>
<body>
<div class="body">
{% block body %}{% endblock %}
</div>
<div class="container">
{% block container %} {% endblock %}
</div>
</body>
</html>
templates\my\index.html.twig
{# Comment #}
{% extends "base.html.twig" %}
{% block title %}super{% endblock %}
{% block body %} 5555 <?php echo "ppppppppp"; ?> 777 {% endblock %}
{% block container %} 7777 {{ mydata }} {% endblock %}
templates\base.html.php
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>{% block title %}Welcome!{% endblock %}</title>
<link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 128 128%22><text y=%221.2em%22 font-size=%2296%22>⚫️</text></svg>">
{# Run `composer require symfony/webpack-encore-bundle` to start using Symfony UX #}
{% block stylesheets %}
{{ encore_entry_link_tags('app') }}
{% endblock %}
{% block javascripts %}
{{ encore_entry_script_tags('app') }}
{% endblock %}
</head>
<body>
<div class="body">
{% block body %}{% endblock %}
</div>
<div class="container">
{% block container %} {% endblock %}
</div>
</body>
</html>
templates\my\exp.html.twig
{% extends "base.html.php" %}
{% block title %}super{% endblock %}
{% block body %}
5555
<a href="{{ path("app_lucky_number") }}">Link</a>
{% endblock %}
{% block container %}
{% include "my/header.html.twig" %}
{% include "my/header.html" %}
{% for i in 1..100 %}
{{ i }} <br>
{% endfor %}
<?php
echo "timur";
?>
{% endblock %}