Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

sunrise-php/vin

Repository files navigation

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

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

Installation

composer require sunrise/vin

How to use?

use InvalidArgumentException;
use Sunrise\Vin\Vin;
try {
 $vin = new Vin('WVWZZZ1KZ6W612305');
} catch (InvalidArgumentException $e) {
 // It isn't a valid VIN...
}
$vin->getVin(); // "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();

Useful links

About

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

Topics

Resources

License

Stars

Watchers

Forks

Packages

Contributors

Languages

AltStyle によって変換されたページ (->オリジナル) /