Dekoder vin sederhana untuk PHP 7.1+ berdasarkan ISO-3779
Instalasi
composer require sunrise/ vin
Bagaimana cara menggunakannya?
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();">
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 ();
Tautan yang bermanfaat
- 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