芝麻web文件管理V1.00
编辑当前文件:/home2/sdektunc/xmintal-back/vendor/fakerphp/faker/src/Faker/Calculator/Ean.php
$digit) { $sums += ((int) $digit) * $sequence[$n % 2]; } return (10 - $sums % 10) % 10; } /** * Checks whether the provided number is an EAN compliant number and that * the checksum is correct. * * @param string $ean An EAN number * * @return bool */ public static function isValid($ean) { if (!preg_match(self::PATTERN, $ean)) { return false; } return self::checksum(substr($ean, 0, -1)) === (int) substr($ean, -1); } }