PHPackages                             bentools/twig-extensions - 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. bentools/twig-extensions

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

bentools/twig-extensions
========================

Some twig extensions

v1.0(10y ago)020MITPHPPHP &gt;=5.4

Since Apr 5Pushed 1y ago1 watchersCompare

[ Source](https://github.com/bpolaszek/twig-extensions)[ Packagist](https://packagist.org/packages/bentools/twig-extensions)[ RSS](/packages/bentools-twig-extensions/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependencies (2)Versions (2)Used By (0)

BenToolsTwigExtensions
======================

[](#bentoolstwigextensions)

Some helpful twig extensions.

Important

This repository is no longer maintained and may be removed in a near future. You may consider forking it.

Installation
------------

[](#installation)

```
composer install bentools/twig-extensions

```

TypeOfExtension
---------------

[](#typeofextension)

Provides basic PHP functions allowing to work with a variable type.

```
{# Filters #}
{{ value | typeOf }}
{{ value | getType }}

{# Functions #}
{% if get_type(value) == 'array' %}
    ...
{% endif %}

{% if is_bool(value) %}
    ...
{% endif %}

{% if is_string(value) %}
    ...
{% endif %}

{% if is_numeric(value) %}
    ...
{% endif %}

{% if is_int(value) %}
    ...
{% endif %}

{% if is_float(value) %}
    ...
{% endif %}

{% if is_null(value) %}
    ...
{% endif %}

{% if is_array(value) %}
    ...
{% endif %}

{% if is_object(value) %}
    ...
{% endif %}

{% if is_scalar(value) %}
    ...
{% endif %}

{% if is_callable(value) %}
    ...
{% endif %}
```

###  Health Score

27

—

LowBetter than 46% of packages

Maintenance28

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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

Unknown

Total

1

Last Release

3782d ago

### Community

Maintainers

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

---

Top Contributors

[![bpolaszek](https://avatars.githubusercontent.com/u/5569077?v=4)](https://github.com/bpolaszek "bpolaszek (2 commits)")

### Embed Badge

![Health badge](/badges/bentools-twig-extensions/health.svg)

```
[![Health](https://phpackages.com/badges/bentools-twig-extensions/health.svg)](https://phpackages.com/packages/bentools-twig-extensions)
```

###  Alternatives

[limenius/react-bundle

Client and Server-side react rendering in a Symfony Bundle

3841.2M](/packages/limenius-react-bundle)[pdewit/nova-external-url

An external URL Laravel Nova field.

30383.2k](/packages/pdewit-nova-external-url)[wbrowar/guide

A CMS Guide for Craft CMS.

6154.7k1](/packages/wbrowar-guide)

PHPackages © 2026

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