PHPackages                             samlittler/upc - 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. samlittler/upc

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

samlittler/upc
==============

A checksum calculator for the UPC check digit method

v2.0.0(3y ago)011.0kPHPPHP ^8

Since Oct 31Pushed 3y ago1 watchersCompare

[ Source](https://github.com/samlittler/upc)[ Packagist](https://packagist.org/packages/samlittler/upc)[ RSS](/packages/samlittler-upc/feed)WikiDiscussions master Synced 2mo ago

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

UPC Checksum Calculator
-----------------------

[](#upc-checksum-calculator)

A PHP library for calculating UPC (Universal Product Code) checksum digits.

Installation
============

[](#installation)

Download and install this library using composer:

```
composer require samlittler/upc

```

Alternatively, download this repository as a ZIP and include the src/UPC.php file in your project.

Usage
=====

[](#usage)

Usage is simple

```
$your_product_code = '03600024145';
$checksum = \SamLittler\UPC\UPC::calculate($your_product_code); // returns 7

```

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity64

Established project with proven stability

 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 ~1667 days

Total

2

Last Release

1451d ago

Major Versions

v1.0.0 → v2.0.02022-05-25

### Community

Maintainers

![](https://www.gravatar.com/avatar/96775b72e83f533028dc82c8f24df717f837f8b3ba00b6f25e305179ef627c3b?d=identicon)[SamMakesCode](/maintainers/SamMakesCode)

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/samlittler-upc/health.svg)

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

###  Alternatives

[wesbos/burner-email-providers

A list of burner email providers.

1.2k189.1k2](/packages/wesbos-burner-email-providers)[verbb/super-table

Super-charge your content builders and create nested Matrix fields.

3141.6M22](/packages/verbb-super-table)[ampproject/amp-toolbox

A collection of AMP tools making it easier to publish and host AMP pages with PHP.

73616.7k1](/packages/ampproject-amp-toolbox)[pugx/shortid-php

An implementation of shortid in PHP

52588.5k3](/packages/pugx-shortid-php)[eklundkristoffer/seedster

24757.6k5](/packages/eklundkristoffer-seedster)[sylius/promotion

Flexible promotion management for PHP applications.

28477.8k9](/packages/sylius-promotion)

PHPackages © 2026

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