PHP>> vin>> 返回
项目作者: sunrise-php

项目描述 :
Simple VIN decoder for PHP 7.1+ (incl. PHP 8) based on ISO-3779
高级语言: PHP
项目地址: git://github.com/sunrise-php/vin.git
创建时间: 2018-10-16T14:18:20Z
项目社区:https://github.com/sunrise-php/vin

开源协议:MIT License

下载


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

  1. composer require sunrise/vin

How to use?

  1. use InvalidArgumentException;
  2. use Sunrise\Vin\Vin;
  3. try {
  4. $vin = new Vin('WVWZZZ1KZ6W612305');
  5. } catch (InvalidArgumentException $e) {
  6. // It isn't a valid VIN...
  7. }
  8. $vin->getVin(); // "WVWZZZ1KZ6W612305"
  9. $vin->getWmi(); // "WVW"
  10. $vin->getVds(); // "ZZZ1KZ"
  11. $vin->getVis(); // "6W612305"
  12. $vin->getRegion(); // "Europe"
  13. $vin->getCountry(); // "Germany"
  14. $vin->getManufacturer(); // "Volkswagen"
  15. $vin->getModelYear(); // [2006]
  16. // convert the VIN to a string
  17. (string) $vin;
  18. // converts the VIN to array
  19. $vin->toArray();