Convert Fahrenheit to Kelvin using PHP

Calculate by formula

<?php function fahrenheitToKelvin(float $fahrenheit): float { return ($fahrenheit + 459.67) / 1.8; } $fahrenheit = 77.9; $kelvin = fahrenheitToKelvin($fahrenheit); echo $kelvin;

Leave a Comment

Cancel reply

Your email address will not be published.