PHPackages                             coercive/slugify - 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. coercive/slugify

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

coercive/slugify
================

Coercive Slugify Utility

1.3.0(8mo ago)11.7k1MITPHPPHP &gt;=7.4

Since Jul 10Pushed 8mo ago1 watchersCompare

[ Source](https://github.com/Coercive/Slugify)[ Packagist](https://packagist.org/packages/coercive/slugify)[ Docs](http://coercive.fr)[ RSS](/packages/coercive-slugify/feed)WikiDiscussions master Synced today

READMEChangelog (10)Dependencies (1)Versions (23)Used By (0)

Coercive Slugify Utility
========================

[](#coercive-slugify-utility)

Slugify allows you to clean the characters in a string for treatment of URL rewriting for example. Other options can detect proper names, clean spaces, move text into utf8 etc ...

Get
---

[](#get)

```
composer require coercive/slugify

```

Usage
-----

[](#usage)

**URL**

```
use Coercive\Utility\Slugify;

$sTitleArticle = 'My title is not made to work with a URL rewriting directly, it must be processed before.';
$sSlug = (new Slugify)->clean($sTitleArticle);
# my-title-is-not-made-to-work-with-a-url-rewriting-directly-it-must-be-processed-before
```

**SUMMARY**

```
use Coercive\Utility\Slugify;

$sText = 'Long text ... Very Long Text ...';
$sSummary = (new Slugify)->substrText($sText);
# GIVE : 300chars text

$sSummary = (new Slugify)->substrText($sText, 500);
# GIVE : 500chars text
```

**NAME**

```
use Coercive\Utility\Slugify;

$sName = 'Mary Antoinette';
$bIsName = (new Slugify)->pregName($sName);
# True

$sName = '@Not A valid name !';
$bIsName = (new Slugify)->pregName($sName);
# False
```

**TO UTF8**

```
use Coercive\Utility\Slugify;

$sString = '&#33;&#87;&#126;&quot;&middot;&oslash;&Upsilon;&psi;';
$sUtf8String = (new Slugify)->toUTF8($sString);
```

###  Health Score

43

—

FairBetter than 90% of packages

Maintenance59

Moderate activity, may be stable

Popularity18

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity73

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 ~161 days

Recently: every ~68 days

Total

22

Last Release

258d ago

PHP version history (4 changes)1.0.0PHP &gt;=5.4.0

1.1.9PHP &gt;=7.1

1.2.2PHP &gt;=7

1.3.0PHP &gt;=7.4

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/20288080?v=4)[Coercive](/maintainers/Coercive)[@Coercive](https://github.com/Coercive)

---

Top Contributors

[![Coercive](https://avatars.githubusercontent.com/u/20288080?v=4)](https://github.com/Coercive "Coercive (20 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/coercive-slugify/health.svg)

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

PHPackages © 2026

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