zeroplex / ean13-validator
Easy helper to check if EAN_13 barcode value is valid
v1.3.2
2019-10-27 13:45 UTC
Requires
- php: >=7.2
Requires (Dev)
- phpunit/phpunit: ^8.0
This package is auto-updated.
Last update: 2025-03-04 17:53:12 UTC
README
This library provider fast code checker for EAN_13
, EAN_8
, ISBN
, TaiwanID
.
Installation
use composer to install:
composer require zeroplex/ean13-validator
Usage
Validate:
<?php use Zeroplex\Ean13; Ean13::isValid('4908569219689'); // true Ean13::isValid('4908569219680'); // false
Get checksum:
<?php Ean13::getCheckSum('4908569219689'); // 9 Ean13::getCheckSum('4908569219680'); // 9