PHP code example of pongtan / twig-php-function
1. Go to this page and download the library: Download pongtan/twig-php-function library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
pongtan / twig-php-function example snippets
$extension = new Umpirsky\Twig\Extension\PhpFunctionExtension();
$extension->allowFunction('hash_hmac');
$extension = new Umpirsky\Twig\Extension\PhpFunctionExtension(['floor', 'ceil']);