Calculate by formula

<?php

function celsiusToKelvin(float $celsius): float
{
    return $celsius + 273.15;
}

$celsius = 25.5;
$kelvin = celsiusToKelvin($celsius);

echo $kelvin;

Leave a Comment

Your email address will not be published. Required fields are marked *