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

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

This package is auto-updated.

Last update: 2024-05-25 14:10:31 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