PHPackages                             danack/esprintf - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. danack/esprintf

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

danack/esprintf
===============

Use laminas-escaper with sprintf like function.

2.1.0(3y ago)0434↓66.7%[4 issues](https://github.com/Danack/esprintf/issues)MITPHPPHP ^8.0 || ^8.1 || ^8.2

Since Nov 11Pushed 3y ago1 watchersCompare

[ Source](https://github.com/Danack/esprintf)[ Packagist](https://packagist.org/packages/danack/esprintf)[ RSS](/packages/danack-esprintf/feed)WikiDiscussions main Synced 3d ago

READMEChangelogDependencies (4)Versions (8)Used By (0)

esprintf
========

[](#esprintf)

sprintf mixed with Laminas escaper.

All placeholder strings must be explicitly labeled as to what type of escaping they will have done to them, so you can see in the source string if the correct escaping is done for the string location.

Usage
-----

[](#usage)

```
    $string = ":html_message";
    $params = [
        ':attr_class' => 'warning',
        ':html_message' => 'foo bar'
    ];

    echo esprintf($string, $params);

```

Supported escapers
------------------

[](#supported-escapers)

```
':attr_'
':js_'
':css_'
':uri_'
':html_'

```

All go through to the relevant Zend Escaper method.

```
':raw_'

```

Allow a raw string to be used, for when the string has already been escaped.

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity78

Established project with proven stability

 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

Every ~510 days

Total

4

Last Release

1211d ago

Major Versions

0.5.0 → 1.0.02019-02-21

1.0.0 → 2.0.02022-06-14

PHP version history (2 changes)0.5.0PHP ^5.6 || ^7.1

2.0.0PHP ^8.0 || ^8.1 || ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/9db967c6005625e444a502fb830a30669b9fed53bfbc67e81a054508c0975a6b?d=identicon)[Danack](/maintainers/Danack)

---

Top Contributors

[![Danack](https://avatars.githubusercontent.com/u/1505719?v=4)](https://github.com/Danack "Danack (13 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/danack-esprintf/health.svg)

```
[![Health](https://phpackages.com/badges/danack-esprintf/health.svg)](https://phpackages.com/packages/danack-esprintf)
```

###  Alternatives

[laminas/laminas-uri

A component that aids in manipulating and validating » Uniform Resource Identifiers (URIs)

3834.9M89](/packages/laminas-laminas-uri)[minime/annotations

The KISS PHP annotations library

229378.6k37](/packages/minime-annotations)[data-uri/data-uri

PHP DataURI component

60627.5k4](/packages/data-uri-data-uri)[neilime/twbs-helper-module

Laminas (formerly Zend Framework) module for easy integration of Twitter Bootstrap

2198.7k](/packages/neilime-twbs-helper-module)[softon/sweetalert

Laravel 5 Package for SweetAlert2. Use this package to easily show sweetalert2 prompts in your laravel app.

2936.1k1](/packages/softon-sweetalert)

PHPackages © 2026

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