Volt functions act as string replacements and do not actually call the underlying function. Volt translates the function into the relevant string which in return is interpreted by PHP.

      /**
       * Setting up the view component
       */
      $di->set('view', function () use ($config) {

      $view = new View();

      $view->setViewsDir($config->application->viewsDir);

      $view->registerEngines(array(
          '.volt' => function ($view, $di) use ($config) {

              $volt = new VoltEngine($view, $di);
              $voltOptions = array(
                  'compiledPath' => $config->application->cacheDir,
                  'compiledSeparator' => '_'
              );
              //load function php
              $compiler = $volt->getCompiler();
            $compiler->addFunction('shuffle', 'str_shuffle');
              return $volt;
          }
      ));

      return $view;
   }, true);

Example above it will binds the function name shuffle in Volt to the PHP function str_shuffle