PHPackages                             imliam/php-name-of-person - 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. imliam/php-name-of-person

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

imliam/php-name-of-person
=========================

Present names for English-language applications.

v1.2.0(4y ago)77734[1 issues](https://github.com/ImLiam/php-name-of-person/issues)[1 PRs](https://github.com/ImLiam/php-name-of-person/pulls)MITPHPPHP ^7.4|^8.1

Since Sep 3Pushed 1y ago2 watchersCompare

[ Source](https://github.com/ImLiam/php-name-of-person)[ Packagist](https://packagist.org/packages/imliam/php-name-of-person)[ Docs](https://github.com/imliam/php-name-of-person)[ RSS](/packages/imliam-php-name-of-person/feed)WikiDiscussions master Synced yesterday

READMEChangelog (3)Dependencies (1)Versions (4)Used By (0)

Name of Person
==============

[](#name-of-person)

[![Latest Version on Packagist](https://camo.githubusercontent.com/1d02971ae240e41b86d480d7f1903537932d73d08c1122df6cf037656f617d0c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f696d6c69616d2f7068702d6e616d652d6f662d706572736f6e2e737667)](https://packagist.org/packages/imliam/php-name-of-person)[![Build Status](https://camo.githubusercontent.com/97cd6ed2d344f74c1ff86d711b1d82291f775251e18b5a68e2ae4f402eb6fdda/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f696d6c69616d2f7068702d6e616d652d6f662d706572736f6e2e737667)](https://travis-ci.org/imliam/php-name-of-person)[![Code Quality](https://camo.githubusercontent.com/2af3fd1a7c69f96cc86a5a67d49fab785e0b29d321dd0944953fbdfb24da9f67/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f696d6c69616d2f7068702d6e616d652d6f662d706572736f6e2e737667)](https://camo.githubusercontent.com/2af3fd1a7c69f96cc86a5a67d49fab785e0b29d321dd0944953fbdfb24da9f67/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f696d6c69616d2f7068702d6e616d652d6f662d706572736f6e2e737667)[![Code Coverage](https://camo.githubusercontent.com/b2cfb34946158fb8233430769578d2aa3c55f234df4c8e009fba678770a62478/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f696d6c69616d2f7068702d6e616d652d6f662d706572736f6e2e737667)](https://camo.githubusercontent.com/b2cfb34946158fb8233430769578d2aa3c55f234df4c8e009fba678770a62478/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f696d6c69616d2f7068702d6e616d652d6f662d706572736f6e2e737667)[![Total Downloads](https://camo.githubusercontent.com/d1649dcd2b220e0a55ba502a97b999f366abe53ad72596c08e3cdf69d9179b4d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f696d6c69616d2f7068702d6e616d652d6f662d706572736f6e2e737667)](https://packagist.org/packages/imliam/php-name-of-person)[![License](https://camo.githubusercontent.com/9927ba39beb67491e481353862b666cf9a4d475a0a962b452567752e7a925e47/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f696d6c69616d2f7068702d6e616d652d6f662d706572736f6e2e737667)](LICENSE.md)

Present names for English-language applications where a first and last name combined is sufficient. This approach does not cover all possible naming cases, deal with other languages or titles.

This is a rough port of [the Ruby package of the same name from Basecamp](https://github.com/basecamp/name_of_person).

- [Name of Person](#name-of-person)
    - [💾 Installation](#%F0%9F%92%BE-installation)
    - [📝 Usage](#%F0%9F%93%9D-usage)
    - [✅ Testing](#%E2%9C%85-testing)
    - [🔖 Changelog](#%F0%9F%94%96-changelog)
    - [⬆️ Upgrading](#%E2%AC%86%EF%B8%8F-upgrading)
    - [🎉 Contributing](#%F0%9F%8E%89-contributing)
        - [🔒 Security](#%F0%9F%94%92-security)
    - [👷 Credits](#%F0%9F%91%B7-credits)
    - [♻️ License](#%E2%99%BB%EF%B8%8F-license)

💾 Installation
--------------

[](#-installation)

You can install the package with [Composer](https://getcomposer.org/) using the following command:

```
composer require imliam/php-name-of-person:^1.1
```

📝 Usage
-------

[](#-usage)

The package supplies a single class that can be instantiated with a string containing the original name of a person.

The class has a handful of methods that can be called to return different variations of the supplied name.

```
use ImLiam\NameOfPerson\Name;

$name = new Name('David Heinemeier Hansson');

$name->getFullName();       // "David Heinemeier Hansson"
$name->getFirstName();      // "David"
$name->getLastName();       // "Heinemeier Hansson"
$name->getInitials();       // "DHH"
$name->getInitials(true);   // "D.H.H."
$name->getFamiliar();       // "David H."
$name->getAbbreviated();    // "D. Heinemeier Hansson"
$name->getSorted();         // "Heinemeier Hansson, David"
$name->getMentionable();    // "davidh"
$name->getPossessive();     // "David Heinemeier Hansson's"
$name->getProperName();     // "David Heinemeier Hansson"
```

These methods take care to handle some of the situations that are often awkward to process and missed when handling names that come from user-input so aren't always reliable.

One such example is that names with particles can be capitalised properly with the `getProperName()` method.

```
(new Name("lucas l'amour"))->getProperName(); // "Lucas l'Amour"
(new Name('t. von lieres und wilkau'))->getProperName(); // "T. von Lieres und Wilkau"
```

✅ Testing
---------

[](#-testing)

```
composer test
```

🔖 Changelog
-----------

[](#-changelog)

Please see [the changelog file](CHANGELOG.md) for more information on what has changed recently.

⬆️ Upgrading
------------

[](#️-upgrading)

Please see the [upgrading file](UPGRADING.md) for details on upgrading from previous versions.

🎉 Contributing
--------------

[](#-contributing)

Please see the [contributing file](CONTRIBUTING.md) and [code of conduct](CODE_OF_CONDUCT.md) for details on contributing to the project.

### 🔒 Security

[](#-security)

If you discover any security related issues, please email  instead of using the issue tracker.

👷 Credits
---------

[](#-credits)

- [Liam Hammett](https://github.com/imliam)
- [Basecamp](https://github.com/basecamp/name_of_person) for the original Ruby gem
- [Armand Niculescu](https://www.media-division.com/correct-name-capitalization-in-php/) for the logic to capitalise names with particles
- [All Contributors](../../contributors)

♻️ License
----------

[](#️-license)

The MIT License (MIT). Please see the [license file](LICENSE.md) for more information.

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance31

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity73

Established project with proven stability

 Bus Factor1

Top contributor holds 80% 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 ~666 days

Total

3

Last Release

1475d ago

PHP version history (2 changes)v1.0.0PHP ^7.1

v1.2.0PHP ^7.4|^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/3e8a14b9f997cf85aacea7d39da9dc33c38cc05fe03360578327ea9bcb25f4d9?d=identicon)[ImLiam](/maintainers/ImLiam)

---

Top Contributors

[![imliam](https://avatars.githubusercontent.com/u/4326337?v=4)](https://github.com/imliam "imliam (4 commits)")[![AntFuture](https://avatars.githubusercontent.com/u/98319652?v=4)](https://github.com/AntFuture "AntFuture (1 commits)")

---

Tags

imliamphp-name-of-person

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/imliam-php-name-of-person/health.svg)

```
[![Health](https://phpackages.com/badges/imliam-php-name-of-person/health.svg)](https://phpackages.com/packages/imliam-php-name-of-person)
```

###  Alternatives

[imliam/laravel-env-set-command

Set a .env file variable from the command line

118352.4k10](/packages/imliam-laravel-env-set-command)

PHPackages © 2026

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