PHPackages                             imliam/php-indefinite-article - 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-indefinite-article

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

imliam/php-indefinite-article
=============================

Determine the indefinite article of an English term

v1.0.0(7y ago)2138.3k5MITPHPPHP ^7.1

Since Feb 12Pushed 1y ago1 watchersCompare

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

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

PHP Indefinite Articles
=======================

[](#php-indefinite-articles)

[![Latest Version on Packagist](https://camo.githubusercontent.com/cbba3d1a0490f29e2a4689fb460dc24c3e3911f825c190d7bb102fd74fffb8d4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f696d6c69616d2f7068702d696e646566696e6974652d61727469636c652e737667)](https://packagist.org/packages/imliam/php-indefinite-article)[![Code Quality](https://camo.githubusercontent.com/1e21f94f1e8f61d476f8d9ffa1b05894776cbad0caf34dac8d98bbe66224cdcb/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f696d6c69616d2f7068702d696e646566696e6974652d61727469636c652e737667)](https://camo.githubusercontent.com/1e21f94f1e8f61d476f8d9ffa1b05894776cbad0caf34dac8d98bbe66224cdcb/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f696d6c69616d2f7068702d696e646566696e6974652d61727469636c652e737667)[![Total Downloads](https://camo.githubusercontent.com/814efb27754100048088c0953ea82cf23ccc7adcbfd551301a2fbf2dafd0d7c5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f696d6c69616d2f7068702d696e646566696e6974652d61727469636c652e737667)](https://packagist.org/packages/imliam/php-indefinite-article)[![License](https://camo.githubusercontent.com/639aff6bce41006510ad8701a336105081231d9641610f4dafe2d42e8a73235d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f696d6c69616d2f7068702d696e646566696e6974652d61727469636c652e737667)](LICENSE.md)

Determine the indefinite article of an English term.

An indefinite article is the word that comes before nouns or noun equivalents in English, such as "*a*" or "*an*". If the word starts with a consonant sound, the article used should be "*a*" — for example "banana" becomes "*a* banana". If the word starts with a vowel sound, the article used should be "*an*" — for example "apple" becomes "*an* apple".

This is not as simple as checking whether the first character of the word is a vowel or consonant as that does not determine the sound pronounced when speaking the word.

This is a port of [Eamon Nerbonne's original solution](https://github.com/EamonNerbonne/a-vs-an) for the problem.

- [PHP Indefinite Articles](#php-indefinite-articles)
    - [💾 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-indefinite-article:^1.0.0
```

📝 Usage
-------

[](#-usage)

```
$word = new ImLiam\IndefiniteArticle\IndefiniteArticle('apple');

echo $word->parse();
// "an apple"

echo $word->article();
// "an"
```

✅ 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)
- [Eamon Nerbonne](https://github.com/EamonNerbonne/a-vs-an) for the original solution
- [All Contributors](../../contributors)

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

[](#️-license)

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

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance34

Infrequent updates — may be unmaintained

Popularity32

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 83.3% 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

2652d ago

### 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 (5 commits)")[![erik-ropez](https://avatars.githubusercontent.com/u/1631035?v=4)](https://github.com/erik-ropez "erik-ropez (1 commits)")

---

Tags

imliamphp-indefinite-article

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/imliam-php-indefinite-article/health.svg)

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

###  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)
