PHP code example of zeroplex / ean13-validator

1. Go to this page and download the library: Download zeroplex/ean13-validator library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

zeroplex / ean13-validator example snippets




use Zeroplex\Ean13;

Ean13::isValid('4908569219689'); // true

Ean13::isValid('4908569219680'); // false



Ean13::getCheckSum('4908569219689'); // 9

Ean13::getCheckSum('4908569219680'); // 9