PHP code example of mibo / prices

1. Go to this page and download the library: Download mibo/prices 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/ */

    

mibo / prices example snippets


$price = new \MiBo\Prices\Price(
    10,
    \MiBo\Prices\Units\Price\Currency::get("EUR"),
    \MiBo\Prices\Calculators\PriceCalc::getVATManager()->retrieveVAT($classification, 'SVK')
);
$price->getValue(); // 10
$price->getValueOfVAT(); // 2 (20% of 10 for the day of writing this)
$price->getValueWithVAT(); // 12 (10 + 2)

$price->forCountry("CZE");
$price->getValueWithVAT(); // 11.5 (10 + 1.5 for the day of writing this)