<?php
// your code goes here
function round_up ($value, $places=0) {
if ($places < 0) { $places = 0; }
$mult = pow(10, $places); if($decimal_length <= $places) {
return $value;
}
return ceil($value * $mult) / $mult; }
$price = 22.4;
$vat_value = 0.1;
$price_to_pay = $price + ($price * $vat_value);
$price_to_pay = round_up($price_to_pay, 3);
$data = ['amount' => (string)$price_to_pay];
PD9waHAKCi8vIHlvdXIgY29kZSBnb2VzIGhlcmUKCmZ1bmN0aW9uIHJvdW5kX3VwICgkdmFsdWUsICRwbGFjZXM9MCkgewogICAgaWYgKCRwbGFjZXMgPCAwKSB7ICRwbGFjZXMgPSAwOyB9CiAgICAkbXVsdCA9IHBvdygxMCwgJHBsYWNlcyk7CiAgICAkZGVjaW1hbF9sZW5ndGggPSBzdHJsZW4oc3Vic3RyKHN0cnJjaHIoJHZhbHVlLCAiLiIpLCAxKSk7CiAgICBpZigkZGVjaW1hbF9sZW5ndGggPD0gJHBsYWNlcykgewogICAgICByZXR1cm4gJHZhbHVlOwogICAgfQogICAgcmV0dXJuIGNlaWwoJHZhbHVlICogJG11bHQpIC8gJG11bHQ7CiAgfQogIAogIAogICRwcmljZSA9IDIyLjQ7CiAgJHZhdF92YWx1ZSA9IDAuMTsKICAkcHJpY2VfdG9fcGF5ID0gJHByaWNlICsgKCRwcmljZSAqICR2YXRfdmFsdWUpOwogICRwcmljZV90b19wYXkgPSByb3VuZF91cCgkcHJpY2VfdG9fcGF5LCAzKTsKICAKICB2YXJfZHVtcCgkcHJpY2VfdG9fcGF5KTsKICAkZGF0YSA9IFsnYW1vdW50JyA9PiAoc3RyaW5nKSRwcmljZV90b19wYXldOwogIGVjaG8ganNvbl9lbmNvZGUoJGRhdGEpOw==