https://github.com/sunrise-php/vin
Simple VIN decoder for PHP 7.1+ based on ISO-3779
https://github.com/sunrise-php/vin
iso-3779 php-library php7 php8 vin vin-codes vin-decoder
Last synced: 17 days ago
JSON representation
Simple VIN decoder for PHP 7.1+ based on ISO-3779
- Host: GitHub
- URL: https://github.com/sunrise-php/vin
- Owner: sunrise-php
- License: mit
- Created: 2018-10-16T14:18:20.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-11-20T14:20:57.000Z (5 months ago)
- Last Synced: 2024-11-24T19:52:09.825Z (5 months ago)
- Topics: iso-3779, php-library, php7, php8, vin, vin-codes, vin-decoder
- Language: PHP
- Homepage:
- Size: 86.9 KB
- Stars: 73
- Watchers: 6
- Forks: 24
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Simple VIN decoder for PHP 7.1+ based on ISO-3779
[](https://gitter.im/sunrise-php/support)
[](https://circleci.com/gh/sunrise-php/vin)
[](https://scrutinizer-ci.com/g/sunrise-php/vin/?branch=master)
[](https://scrutinizer-ci.com/g/sunrise-php/vin/?branch=master)
[](https://packagist.org/packages/sunrise/vin)
[](https://packagist.org/packages/sunrise/vin)
[](https://packagist.org/packages/sunrise/vin)## Installation
```bash
composer require sunrise/vin
```## How to use?
```php
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
* https://en.wikipedia.org/wiki/Vehicle_identification_number
* https://en.wikibooks.org/wiki/Vehicle_Identification_Numbers_(VIN_codes)
* https://en.wikibooks.org/wiki/Vehicle_Identification_Numbers_(VIN_codes)/World_Manufacturer_Identifier_(WMI)
* https://en.wikibooks.org/wiki/Vehicle_Identification_Numbers_(VIN_codes)/Model_year