The php_function function offers a way to use php global functions in a Twig template.
{{ php_function('implode', [' ', ['This', 'is', 'a', 'php', 'function', 'call']]) }} {# outputs "This is a php function call" #}
Last updated 4 years ago
Was this helpful?