PHPackages                             turbopixel/gs1validator - 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. [Validation &amp; Sanitization](/categories/validation)
4. /
5. turbopixel/gs1validator

ActiveLibrary[Validation &amp; Sanitization](/categories/validation)

turbopixel/gs1validator
=======================

GS1 barcode validator library

0.2(4y ago)08CC-BY-SA-4.0PHPPHP &gt;=7.3.0

Since Sep 17Pushed 4y ago1 watchersCompare

[ Source](https://github.com/turbopixel/GS1Validator)[ Packagist](https://packagist.org/packages/turbopixel/gs1validator)[ RSS](/packages/turbopixel-gs1validator/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

GS1Valdiator (version 0.2)
==========================

[](#gs1valdiator-version-02)

This library is a small gs1 barcode validation class.

Methods
-------

[](#methods)

### public strLength(string $str) : int

[](#public-strlengthstring-str--int)

Get the string length

### public isValidEan13(string $ean13) : bool

[](#public-isvalidean13string-ean13--bool)

Validate the EAN13 barcode number

### public getEan13CheckDigit(string $ean13) : int

[](#public-getean13checkdigitstring-ean13--int)

Calculate the EAN13 check digit

Runtime results
---------------

[](#runtime-results)

`php -f tests/performance.php`

```
  System: Linux 4.19.0-10-amd64 #1 SMP Debian 4.19.132-1 (2020-07-24) x86_64
  PHP Version 7.3.27-1~deb10u1

  /////////////////////////////////////////////////
  /////////////////////////////////////////////////
                 phpunit runtime test
  /////////////////////////////////////////////////
  /////////////////////////////////////////////////
Array
(
    [Clock time in seconds] => 0.0034449100494385
    [Time taken in User Mode in seconds] => 0.0034390000000002
    [Time taken in System Mode in seconds] => 0
    [Total time taken in Kernel in seconds] => 0.0034390000000002
    [Memory limit in MB] => 256
    [Memory usage in MB] => 0.20989227294922
    [Peak memory usage in MB] => 0.6064453125
    [Maximum resident shared size in KB] => 20
    [Integral shared memory size] => 0
    [Integral unshared data size] => 0
    [Integral unshared stack size] => Not Available
    [Number of page reclaims] => 20
    [Number of page faults] => 0
    [Number of block input operations] => 0
    [Number of block output operations] => Not Available
    [Number of messages sent] => 0
    [Number of messages received] => 0
    [Number of signals received] => 0
    [Number of voluntary context switches] => 0
    [Number of involuntary context switches] => 0
)

  /////////////////////////////////////////////////
  /////////////////////////////////////////////////
                      Benchmark
          run isValidEan13 1.000.000 times
  /////////////////////////////////////////////////
  /////////////////////////////////////////////////
Array
(
    [Clock time in seconds] => 1.4627749919891
    [Time taken in User Mode in seconds] => 1.462003
    [Time taken in System Mode in seconds] => 1.000000000001E-6
    [Total time taken in Kernel in seconds] => 1.462004
    [Memory limit in MB] => 256
    [Memory usage in MB] => 0.0022964477539062
    [Peak memory usage in MB] => 0.61138153076172
    [Maximum resident shared size in KB] => 0
    [Integral shared memory size] => 0
    [Integral unshared data size] => 0
    [Integral unshared stack size] => Not Available
    [Number of page reclaims] => 0
    [Number of page faults] => 0
    [Number of block input operations] => 0
    [Number of block output operations] => Not Available
    [Number of messages sent] => 0
    [Number of messages received] => 0
    [Number of signals received] => 0
    [Number of voluntary context switches] => 0
    [Number of involuntary context switches] => 16
)

```

License (CC BY-SA 4.0)
----------------------

[](#license-cc-by-sa-40)

Take a look into the LICENSE file.

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

 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

1749d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2bb81d5bdef7e45104762400e196bbc8543f828f446b6f5cb4c880940231a213?d=identicon)[turbopixel](/maintainers/turbopixel)

---

Top Contributors

[![turbopixel](https://avatars.githubusercontent.com/u/15839724?v=4)](https://github.com/turbopixel "turbopixel (8 commits)")

---

Tags

barcodeean13gs1phpvalidatorvalidatorbarcodeEAN13gs1

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/turbopixel-gs1validator/health.svg)

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

###  Alternatives

[ronanguilloux/isocodes

PHP library - Validators for standards from ISO, International Finance, Public Administrations, GS1, Book and Music Industries, Phone numbers &amp; Zipcodes for many countries

8123.5M26](/packages/ronanguilloux-isocodes)[respect/validation

The most awesome validation engine ever created for PHP

6.0k39.9M414](/packages/respect-validation)[seld/jsonlint

JSON Linter

1.3k228.7M270](/packages/seld-jsonlint)[composer/spdx-licenses

SPDX licenses list and validation library.

1.4k193.5M40](/packages/composer-spdx-licenses)[opis/json-schema

Json Schema Validator for PHP

65243.6M296](/packages/opis-json-schema)[laminas/laminas-validator

Validation classes for a wide range of domains, and the ability to chain validators to create complex validation criteria

15848.2M220](/packages/laminas-laminas-validator)

PHPackages © 2026

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