/vin

Sunrise // Simple VIN decoder for PHP 7.1+ based on ISO-3779

Primary LanguagePHPMIT LicenseMIT

Sunrise // Simple VIN decoder for PHP 7.1+ based on ISO-3779

Gitter Build Status Scrutinizer Code Quality Code Coverage Latest Stable Version Total Downloads License

Installation

composer require sunrise/vin

How to use?

use InvalidArgumentException;
use Sunrise\Vin\Vin;

try {
    $vin = new Vin('WVWZZZ1KZ6W612305');
} catch (InvalidArgumentException $e) {
    // It's not a valid VIN
}

$vin->getVin(); // returns "WVWZZZ1KZ6W612305"
$vin->getWmi(); // returns "WVW"
$vin->getVds(); // returns "ZZZ1KZ"
$vin->getVis(); // returns "6W612305"
$vin->getRegion(); // returns "Europe"
$vin->getCountry(); // returns "Germany"
$vin->getManufacturer(); // returns "Volkswagen"
$vin->getModelYear(); // returns [2006]

Useful links