Skip to content

Instantly share code, notes, and snippets.

View joeybab3's full-sized avatar

Joey Babcock joeybab3

View GitHub Profile
@JaggedJax
JaggedJax / SSCC-18.php
Created October 4, 2017 20:34
Generate SSCC-18 barcode & verify SSCC-18 check digit
<?php
/**
* Generate and return an SSCC-18 barcode. DOES NOT include leading "00"
* Params can be passed as strings or ints and will be padded to proper length.
* @param string $next_serial_available
* @param string $extension
* @param string $gs1_prefix
* @param string $min_serial
* @param string $max_serial