There is no license information available for the latest version (v2.0.0) of this package.

A checksum calculator for the UPC check digit method

Installs: 11 039

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

pkg:composer/samlittler/upc

v2.0.0 2022-05-25 09:35 UTC

This package is auto-updated.

Last update: 2025-09-25 17:02:44 UTC


README

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

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 is simple

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