PHPackages                             alanwhitney/php-upc-checker - 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. alanwhitney/php-upc-checker

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

alanwhitney/php-upc-checker
===========================

Just a simple checker of UPC Codes

v1(4y ago)06AGPL-3.0-or-laterPHPPHP &gt;=7.0.0

Since Jul 14Pushed 4y ago1 watchersCompare

[ Source](https://github.com/alanwhitney/php-upc-checker)[ Packagist](https://packagist.org/packages/alanwhitney/php-upc-checker)[ RSS](/packages/alanwhitney-php-upc-checker/feed)WikiDiscussions main Synced 6d ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

php-upc-checker
===============

[](#php-upc-checker)

Just a simple checker of UPC Codes

Installation (with composer)
----------------------------

[](#installation-with-composer)

```
composer require alanwhitney/php-upc-checker

```

Usage
-----

[](#usage)

```
// Class instantation
$barcode = '076683052001';
$upc = new \alanwhitney\php-upc-checker\Barcode();
$upc->setBarcode($barcode);

// Check for valid
if ($validator->isValid()) {
	echo 'Valid :)';
} else {
	echo 'Invalid :(';
}

// Get a check sum digit
$upc->setBarcode(substr($barcode, 0, -1));
$upc->addCheckSum();
echo $upc->getBarcode();

// Get a check sum and add a leading zero if needed
$upc->setBarcode(substr($barcode, 1, -1));
$upc->addZeroCheckSum();
echo $upc->getBarcode();
```

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity46

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

Unknown

Total

1

Last Release

1767d ago

### Community

Maintainers

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

---

Top Contributors

[![alanwhitney](https://avatars.githubusercontent.com/u/87238450?v=4)](https://github.com/alanwhitney "alanwhitney (2 commits)")

### Embed Badge

![Health badge](/badges/alanwhitney-php-upc-checker/health.svg)

```
[![Health](https://phpackages.com/badges/alanwhitney-php-upc-checker/health.svg)](https://phpackages.com/packages/alanwhitney-php-upc-checker)
```

###  Alternatives

[phois/whois

Whois client.

36785.9k](/packages/phois-whois)

PHPackages © 2026

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