PHPackages                             progest/twig-extension-callfunc - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. progest/twig-extension-callfunc

ActiveLibrary[Templating &amp; Views](/categories/templating)

progest/twig-extension-callfunc
===============================

Twig extension to call PHP functions or static methods from templates

1.2(7y ago)01.4kMITPHPPHP &gt;=7.0

Since Aug 2Pushed 7y agoCompare

[ Source](https://github.com/ProGestSA/twig-extension-callfunc)[ Packagist](https://packagist.org/packages/progest/twig-extension-callfunc)[ Docs](https://github.com/ProGestSA/twig-extension-callfunc)[ RSS](/packages/progest-twig-extension-callfunc/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (3)Dependencies (1)Versions (4)Used By (0)

twig-extension-callfunc
=======================

[](#twig-extension-callfunc)

Twig extension to call PHP functions or static methods from templates

Installation:

```
# $twig being your Twig_Environment object
$twig->addExtension(new \ProGest\Twig\CallFuncExtension());
```

Usage:

```
# Call function
{{ callfunc('myFunction') }}

# Call static method
{{ callfunc('myClass::myStaticMethod') }}

# Pass one or multiple arguments
{{ callfunc('myFunction', 8546) }}
{{ callfunc('myFunction', ['testValue', 9897]) }}

```

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity60

Established project with proven stability

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~116 days

Total

3

Last Release

2657d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/cfbed2b9af7793bee45a40e376ad4c5ce4d949d625bfa349468c50eab4954aaf?d=identicon)[ProGest](/maintainers/ProGest)

---

Tags

twigclassstaticfunctionmethod

### Embed Badge

![Health badge](/badges/progest-twig-extension-callfunc/health.svg)

```
[![Health](https://phpackages.com/badges/progest-twig-extension-callfunc/health.svg)](https://phpackages.com/packages/progest-twig-extension-callfunc)
```

###  Alternatives

[timber/timber

Create WordPress themes with beautiful OOP code and the Twig Template Engine

5.7k3.6M127](/packages/timber-timber)[twig/intl-extra

A Twig extension for Intl

36567.2M320](/packages/twig-intl-extra)[symfony/ux-twig-component

Twig components for Symfony

22017.2M313](/packages/symfony-ux-twig-component)[symfony/ux-live-component

Live components for Symfony

1636.5M115](/packages/symfony-ux-live-component)[twig/cssinliner-extra

A Twig extension to allow inlining CSS

22919.7M81](/packages/twig-cssinliner-extra)[twig/inky-extra

A Twig extension for the inky email templating engine

16613.2M70](/packages/twig-inky-extra)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
