PHPackages                             zachflower/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. zachflower/indefinite-article

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

zachflower/indefinite-article
=============================

Library for programmatically determining the appropriate indefinite article to use (a/an)

v0.1.0(9y ago)11287.2k↓45.7%2BSDPHPPHP &gt;= 5.3.0

Since Sep 1Pushed 8y ago1 watchersCompare

[ Source](https://github.com/zachflower/php-indefinite-article)[ Packagist](https://packagist.org/packages/zachflower/indefinite-article)[ RSS](/packages/zachflower-indefinite-article/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

PHP Indefinite Article Library
==============================

[](#php-indefinite-article-library)

PHP implementation of the [Lingua::EN::Inflect](http://search.cpan.org/dist/Lingua-EN-Inflect/lib/Lingua/EN/Inflect.pm) Perl module's A() and AN() subroutines, originally [ported to PHP](https://github.com/Kaivosukeltaja/php-indefinite-article) by [Niko Salminen](http://nikosalminen.com).

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

[](#installation)

### Via Composer

[](#via-composer)

Require the library and update via [Composer](https://getcomposer.org/):

```
composer require zachflower/indefinite-article
composer update

```

### Manually

[](#manually)

Download the [latest release](https://github.com/zachflower/php-indefinite-article/archive/master.zip), extract into a directory called `indefinite-article`, and include the library at the beginning of your script:

```
include_once('./indefinite-articles/src/IndefiniteArticle.php');
use \IndefiniteArticle\IndefiniteArticle;

```

Usage
-----

[](#usage)

The PHP Indefinite Article Library is used to determine the proper indefinite article to use before a word ('a' or 'an'). To do so, simply call the `A()` method with your word or phrase:

```
IndefiniteArticle::A('elephant')

```

The method will return a string prefixed with the appropriate indefinite article:

```
an elephant

```

Copyright and License
---------------------

[](#copyright-and-license)

Original Perl module Copyright © 1997-2009 Damian Conway; Original PHP port Copyright © 2012 Niko Salminen; Current library copyright © 2016 Zachary Flower; Code released under the [BSD license](LICENSE).

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity42

Moderate usage in the ecosystem

Community12

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

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

3592d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/920019?v=4)[Zachary Flower](/maintainers/zachflower)[@zachflower](https://github.com/zachflower)

---

Top Contributors

[![Kaivosukeltaja](https://avatars.githubusercontent.com/u/881135?v=4)](https://github.com/Kaivosukeltaja "Kaivosukeltaja (5 commits)")[![kjbjm](https://avatars.githubusercontent.com/u/2024496?v=4)](https://github.com/kjbjm "kjbjm (3 commits)")[![zachflower](https://avatars.githubusercontent.com/u/920019?v=4)](https://github.com/zachflower "zachflower (2 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[jms/composer-deps-analyzer

Builds a Dependency Graph from a composer.json file

62277.7k3](/packages/jms-composer-deps-analyzer)

PHPackages © 2026

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