PHPackages                             mathiasverraes/classfunctions - 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. mathiasverraes/classfunctions

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

mathiasverraes/classfunctions
=============================

Functions to manipulate class names

1.1.0(11y ago)34472.6k↓15.5%210MITPHPPHP &gt;=5.4

Since Feb 6Pushed 10y ago2 watchersCompare

[ Source](https://github.com/mathiasverraes/classfunctions)[ Packagist](https://packagist.org/packages/mathiasverraes/classfunctions)[ Docs](http://verraes.net)[ RSS](/packages/mathiasverraes-classfunctions/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (4)Used By (10)

ClassFunctions
==============

[](#classfunctions)

PHP Utilities to get different variations of class names

```
use Verraes\ClassFunctions;

// Fully qualified class name of an object, without a leading backslash
ClassFunctions\fqcn($object);

// Canonical class name of an object, of the form "My.Namespace.MyClass"
ClassFunctions\canonical($object);

// Underscored and lowercased class name of an object, of the form "my.namespace.my_class"
ClassFunctions\underscore($object);

// The class name of an object, without the namespace
ClassFunctions\short($object);
```

The above methods also accept strings, and `ClassFunctions\fqcn()` accepts a canonical class name as returned from `ClassFunctions\canonical()`.

Free bonus feature:

```
// Returns an associative array of 'CONSTANT_NAME' => 'value'
ClassFunctions\constants('Verraes\ClassFunctions\Tests\MyClass')
```

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

[](#installation)

You can install ClassFunctions with Composer:

```
composer require mathiasverraes/classfunctions

```

Run `composer install` or `composer update` and you're ready to start.

###  Health Score

40

—

FairBetter than 88% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity46

Moderate usage in the ecosystem

Community21

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 76.2% 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 ~86 days

Total

3

Last Release

4312d ago

PHP version history (2 changes)1.0.0PHP &gt;=5.5

1.0.1PHP &gt;=5.4

### Community

Maintainers

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

---

Top Contributors

[![mathiasverraes](https://avatars.githubusercontent.com/u/489516?v=4)](https://github.com/mathiasverraes "mathiasverraes (16 commits)")[![texdc](https://avatars.githubusercontent.com/u/1590605?v=4)](https://github.com/texdc "texdc (3 commits)")[![kelvinj](https://avatars.githubusercontent.com/u/31241?v=4)](https://github.com/kelvinj "kelvinj (2 commits)")

---

Tags

classesutilities

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/mathiasverraes-classfunctions/health.svg)

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

###  Alternatives

[vaimo/composer-patches

Applies a patch from a local or remote file to any package that is part of a given composer project. Patches can be defined both on project and on package level. Optional support for patch versioning, sequencing, custom patch applier configuration and patch command for testing/troubleshooting added patches.

2994.3M16](/packages/vaimo-composer-patches)[lodash-php/lodash-php

A port of Lodash to PHP

527719.0k5](/packages/lodash-php-lodash-php)[gehrisandro/tailwind-merge-laravel

TailwindMerge for Laravel merges multiple Tailwind CSS classes by automatically resolving conflicts between them

341682.2k18](/packages/gehrisandro-tailwind-merge-laravel)[lorisleiva/lody

Load files and classes as lazy collections in Laravel.

956.6M9](/packages/lorisleiva-lody)[gehrisandro/tailwind-merge-php

TailwindMerge for PHP merges multiple Tailwind CSS classes by automatically resolving conflicts between them

1391.5M9](/packages/gehrisandro-tailwind-merge-php)[kartik-v/yii2-helpers

A collection of useful helper functions for Yii Framework 2.0

883.0M29](/packages/kartik-v-yii2-helpers)

PHPackages © 2026

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