alcea/cif

PHP validation for Romanian VAT code (Validare PHP pentru CIF | CUI)

v1.0 2016-12-28 13:45 UTC

README

Build Status Latest Stable Version Total Downloads Latest Unstable Version License

CIF

PHP validation for Romanian VAT code (Validare PHP pentru CIF/ CUI)

#How to install?

1. Use composer

composer require  alcea/cif "*"

2. or, edit require section from composer.json

"alcea/cif": "*"

3. or, clone from GitHub

git clone https://github.com/alceanicu/cif.git

#How to use?

 <?php
 use alcea\cif\Cif;
 
 $cifToBeValidated = '159'; // without prefix digit (RO|R)
 $cif = new Cif($cifToBeValidated);
 echo "CIF {$cifToBeValidated} is " . ( $cif->isValid() ? 'valid' : 'invalid' ) . PHP_EOL;

License

MIT.