sunrise / vin
VIN decoder for PHP 7.1+ based on ISO-3779
Installs: 81 865
Dependents: 0
Suggesters: 0
Security: 0
Stars: 74
Watchers: 6
Forks: 24
Open Issues: 9
Requires
- php: ^7.1|^8.0
Requires (Dev)
- phpunit/phpunit: 7.5.20|9.5.0
- sunrise/coding-standard: 1.0.0
- dev-master
- v1.3.0
- v1.2.1
- v1.2.0
- v1.1.4
- v1.1.3
- v1.1.2
- v1.1.1
- v1.1.0
- v1.0.14
- v1.0.13
- v1.0.12
- v1.0.11
- v1.0.10
- v1.0.9
- v1.0.8
- v1.0.7
- v1.0.6
- v1.0.5
- v1.0.4
- v1.0.3
- v1.0.2
- v1.0.1
- v1.0.0
- dev-renovate/phpunit-phpunit-11.x
- dev-renovate/phpunit-phpunit-9.x
- dev-renovate/cimg-php-8.x
- dev-dependabot/composer/phpunit/phpunit-tw-11.4.0
- dev-renovate/cimg-php-7.x
- dev-release/v1.2.0
- dev-release/v1.1.4
- dev-dependabot/add-v2-config-file
- dev-release/v1.1.0
- dev-release/v1.0.13
This package is auto-updated.
Last update: 2024-12-21 08:11:19 UTC
README
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
- 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