Simple template engine in PHP
This template is either unusable or would make you write HTML in the business logic part  spoiling the whole idea.

A template engine is a more complex application than people often think. There is always a presentation logic that could be quite complex. Which means a template must support programming statements. At least loops and conditions. Without them, it will be almost unusable.

Imagine you need to list 10 posts an a blog. How it could be done in your template? Going to add all the HTML formatting to variables before assigning them? Really?

So, such a simple template could be made viable only by letting PHP to interpret the template. So it could be like

public function render($template, $variables = []) {
    array_merge($this-&gt;variables, $variables);
    extract($variables)
    ob_start();
    include $template;
    return ob_get_clean();
}


this way you will be able to use full featured templates that will contain all the logic needed for the presentation of your data.