PHP code example of sandwave-io / vat

1. Go to this page and download the library: Download sandwave-io/vat library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

sandwave-io / vat example snippets


$vatService = new \SandwaveIo\Vat\Vat;

$vatService->validateEuropeanVatNumber("YOURVATNUMBERHERE", "COUNTRYCODE"); // true

$vatService->countryInEurope('NL'); // true

$vatService->europeanVatRate("YOURVATNUMBERHERE"); // 0.0

/** @var Psr\SimpleCache\CacheInterface $cache */

$vatService = new \SandwaveIo\Vat\Vat(cache: $cache);