<?php

// your code goes here

function round_up ($value, $places=0) {
    if ($places < 0) { $places = 0; }
    $mult = pow(10, $places);
    $decimal_length = strlen(substr(strrchr($value, "."), 1));
    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);
  
  var_dump($price_to_pay);
  $data = ['amount' => (string)$price_to_pay];
  echo json_encode($data);