Cover multiple Twig function names with a wildcard function name

Code
<?php

$closure 
= function($asterisk$str) {
    return 
"<$asterisk>".md5($str)."</$asterisk>";
};

// twig function name has a * wildcard
$function = new Twig\TwigFunction('md5_*'$closure,
    [
'is_safe' => ['html']]);

// Using md5_* function in template
$templates = [
    
'template' => '{{ md5_strong("string") }}
    <br>{{ md5_em("string") }}'
,
];
$loader = new Twig\Loader\ArrayLoader($templates);
$twig = new Twig\Environment($loader);
$twig->addFunction($function);

echo 
$twig->render('template');
Result
b45cffe084dd3d20d928bee85e7b0f21
b45cffe084dd3d20d928bee85e7b0f21
Used Versions
PHP 8.2, Laminas MVC 3.2, Symfony 5.2, Laravel 8.28, PHPUnit 9.5, Doctrine ORM 2.8