vin
v1.3.0
composer require sunrise/ vin
use InvalidArgumentException ;
use Sunrise vin vin ;
try {
$ vin = new vin ( ' WVWZZZ1KZ6W612305 ' );
} catch ( InvalidArgumentException $ e ) {
// It isn't a valid vin ...
}
$ vin -> get vin (); // "WVWZZZ1KZ6W612305"
$ vin -> getWmi (); // "WVW"
$ vin -> getVds (); // "ZZZ1KZ"
$ vin -> getVis (); // "6W612305"
$ vin -> getRegion (); // "Europe"
$ vin -> getCountry (); // "Germany"
$ vin -> getManufacturer (); // "Volkswagen"
$ vin -> getModelYear (); // [2006]
// convert the vin to a string
( string ) $ vin ;
// converts the vin to array
$ vin -> toArray ();