PHPackages                             smhg/salutation - 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. smhg/salutation

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

smhg/salutation
===============

Salutation generator

v0.1.4(9y ago)25.9k↓41.7%[3 issues](https://github.com/smhg/salutation-php/issues)MITPHPPHP &gt;=5.3.0

Since Apr 14Pushed 9y ago2 watchersCompare

[ Source](https://github.com/smhg/salutation-php)[ Packagist](https://packagist.org/packages/smhg/salutation)[ RSS](/packages/smhg-salutation/feed)WikiDiscussions master Synced 1mo ago

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

salutation [![Build status](https://camo.githubusercontent.com/bc5a35e18777abffd509cdaa7dc2165fdb2c765756a3ff26f12ba723ef57c15a/68747470733a2f2f6170692e7472617669732d63692e6f72672f736d68672f73616c75746174696f6e2d7068702e706e67)](https://travis-ci.org/smhg/salutation-php)
===============================================================================================================================================================================================================================================================================

[](#salutation-)

Generates a salutation based on predefined formats.

Use case
--------

[](#use-case)

In e-mails, dashboards and others, you often want to start with a personalised greeting. This might be to multiple people, of which you might have complete, partial or no names available. Some might have titles which are to be used when adressing them. And things might differ across locales.

As an example, you might need to greet a list of 3 users: one is a regular person (Joe Bloggs), one is a company without a contact's name (ACME) and one a physician/doctor (Jane Smith). First name concatenation would lead to:

```
Dear Joe, , Jane,

```

While what you want is:

```
Dear Joe, Dr. Smith,

```

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

[](#installation)

```
composer require smhg/salutation
```

Usage
-----

[](#usage)

```
use Salutation;

$salutation = new Salutation('nl_BE', array(
	array(
		'first' => 'Jan',
		'last' => 'Jansens'
	),
	array(
		'title' => 'Dr.',
		'first' => 'Peter',
		'last' => 'Peters'
	)
));

echo $salutation;
// Beste Jan, Dr. Peters,
```

Features
--------

[](#features)

- Locale aware formatting
- Title based formatting
- Nameless greeting

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity52

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

Every ~152 days

Total

5

Last Release

3444d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8f5aff3cb1755a1fbf76ff89754e1ad996338a7ebfa1c24301f319a28938f517?d=identicon)[smhg](/maintainers/smhg)

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/smhg-salutation/health.svg)

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

###  Alternatives

[pyyoshi/shortuuid-php

2226.1k](/packages/pyyoshi-shortuuid-php)

PHPackages © 2026

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