PHPackages                             tf/string - 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. tf/string

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

tf/string
=========

TfTruncate lets you truncate HTML content but keep some HTML tags in the result

1.4.0(12y ago)01821GPL-2.0+PHPPHP &gt;=5.2.6

Since Jun 20Pushed 12y ago1 watchersCompare

[ Source](https://github.com/tophfr/tf-string)[ Packagist](https://packagist.org/packages/tf/string)[ Docs](http://lib.tf)[ RSS](/packages/tf-string/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependenciesVersions (2)Used By (1)

TfString
========

[](#tfstring)

One class only in this library : TfTruncate which let you truncate HTML content but keep some HTML tags in the result.

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community9

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

4397d ago

### Community

Maintainers

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

---

Top Contributors

[![tophfr](https://avatars.githubusercontent.com/u/866760?v=4)](https://github.com/tophfr "tophfr (1 commits)")

---

Tags

htmlcontenttruncate

### Embed Badge

![Health badge](/badges/tf-string/health.svg)

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

###  Alternatives

[willdurand/negotiation

Content Negotiation tools for PHP provided as a standalone library.

1.4k129.0M214](/packages/willdurand-negotiation)[j0k3r/php-readability

Automatic article extraction from HTML

184892.5k8](/packages/j0k3r-php-readability)[caxy/php-htmldiff

A library for comparing two HTML files/snippets and highlighting the differences using simple HTML.

21522.3M22](/packages/caxy-php-htmldiff)[urodoz/truncate-html

Handle truncate action on HTML strings

21303.6k6](/packages/urodoz-truncate-html)[coldtrick/thewire_tools

Extend the functionality of The Wire

133.2k](/packages/coldtrick-thewire-tools)

PHPackages © 2026

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