lucasnpinheiro / ean
Extract ean
1.0.2
2024-10-08 17:38 UTC
Requires
- php: ^8.2
Requires (Dev)
- phpunit/phpunit: ^11.4
README
Validação do EAN
<?php declare(strict_types=1); use Lucasnpinheiro\Ean\EanExtractor; require __DIR__. '/../vendor/autoload.php'; $ean = '2018740009892'; $eanExists = new EanExtractor($ean); print_r($eanExists->toArray()); print_r($eanExists->toObject());
Retornos esperados
Array ( [ean_code] => 2018740009892 [scale_product] => [international_number] => [custom_code_999] => [custom_code_2] => 1 [code] => 01874 [value] => 000989 )
stdClass Object ( [ean_code] => 2018740009892 [scale_product] => [international_number] => [custom_code_999] => [custom_code_2] => 1 [code] => 01874 [value] => 000989 )