This should output "Test" but gives the following error in Smarty 5 / dev-master. Working with latest 4.x version.
Smarty\CompilerException: Syntax error in template "string:{customTag}" on line 1 "{customTag}" unknown tag 'customtag' in string:{customTag} on line 1
<?php
require 'vendor/autoload.php';
use Smarty\Smarty;
//use \Smarty;
class Functions
{
public static function customTag()
{
return 'Test';
}
}
$smarty = new Smarty();
$smarty->registerPlugin(Smarty::PLUGIN_FUNCTION, 'customTag', [Functions::class, 'customTag']);
$smarty->display('string:{customTag}');
This should output "Test" but gives the following error in Smarty 5 / dev-master. Working with latest 4.x version.