PHPackages                             thehiddenhaku/sscc - 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. [PSR &amp; Standards](/categories/psr-standards)
4. /
5. thehiddenhaku/sscc

ActiveLibrary[PSR &amp; Standards](/categories/psr-standards)

thehiddenhaku/sscc
==================

PHP Serial Shipping Container Code Generator

0.2(10y ago)640.6k—7.1%2[1 issues](https://github.com/TheHiddenHaku/SSCC/issues)MITPHP

Since Apr 20Pushed 9y agoCompare

[ Source](https://github.com/TheHiddenHaku/SSCC)[ Packagist](https://packagist.org/packages/thehiddenhaku/sscc)[ RSS](/packages/thehiddenhaku-sscc/feed)WikiDiscussions master Synced 1mo ago

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

Serial Shipping Container Code (S.S.C.C.) Calculator
====================================================

[](#serial-shipping-container-code-sscc-calculator)

A simple PHP class to calculate a full SSCC code given your vendor code and shipping number

```
$vendorCode = 800200800;
$shippingNumber = 1234;
$sscc = new TheHiddenHaku\SerialShippingContainerCode\SerialShippingContainerCode($vendorCode);
echo $sscc->calculate($shippingNumber);
//echoes '080020080000012346'
```

### Installation

[](#installation)

install with composer

```
composer require thehiddenhaku/sscc

```

### Usage

[](#usage)

First you need to instantiate the class

```
$sscc = new TheHiddenHaku\SerialShippingContainerCode\SerialShippingContainerCode($vendorCode, $extensionDigit);
```

The first parameter `$vendorCode` is your personal vendor code.

The code must be assigned to you (or your client) by and authority.

It can be either 7 or 9 digit long.

The second parameter `$extensionDigit` is an optional digit that will be added at the beginning of the code.

It defaults to `0` but you can override it with any positive integer between `0` and `9`

Once the class is ready, just call the `calculate()` method like this

```
$code = $sscc->calculate($shippingNumber);
```

the parameter `$shippingNumber` id the progressive number of your shipping.

If your `$vendorCode` is 7 digit your `$shippingNumber` must be 9 digit (it will be "zerofilled" behind the scene)

if your `$vendorCode` is 9 digit your `$shippingNumber` must be 7 digit (it will be "zerofilled" behind the scene)

The method will return a complete SSCC code (with the correct Check Digit) which you can use where needed for instance in logistic labels

\###Testing

I used phpunit so you can just run

```
vendor/bin/phpunit
```

### Contribute

[](#contribute)

Feel free to contribute and improve the class. just fork it and open you PR

### License

[](#license)

This library is licensed under the MIT license. Please see [License file](LICENSE.txt) for more information.

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance17

Infrequent updates — may be unmaintained

Popularity35

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

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

Total

2

Last Release

3680d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/5628820?v=4)[Alessio Bottiroli](/maintainers/TheHiddenHaku)[@TheHiddenHaku](https://github.com/TheHiddenHaku)

---

Top Contributors

[![TheHiddenHaku](https://avatars.githubusercontent.com/u/5628820?v=4)](https://github.com/TheHiddenHaku "TheHiddenHaku (15 commits)")

---

Tags

barcodescalculatorlogisticsphpsccshippingcontainercodeshippingssccserialTheHiddenHakuLogistic

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/thehiddenhaku-sscc/health.svg)

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

###  Alternatives

[psr/container

Common Container Interface (PHP FIG PSR-11)

10.0k1.0B3.7k](/packages/psr-container)[pimple/pimple

Pimple, a simple Dependency Injection Container

2.7k130.5M1.4k](/packages/pimple-pimple)[php-di/php-di

The dependency injection container for humans

2.8k48.9M994](/packages/php-di-php-di)[league/container

A fast and intuitive dependency injection container.

86787.8M343](/packages/league-container)[dvdoug/boxpacker

An implementation of the 3D (actually 4D) bin packing/knapsack problem (aka creating parcels by putting items into boxes)

6522.7M18](/packages/dvdoug-boxpacker)[league/tactician-container

Tactician integration for any container implementing PSR-11

7710.1M23](/packages/league-tactician-container)

PHPackages © 2026

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