Skip to content

Instantly share code, notes, and snippets.

@bmcculley
Created February 19, 2014 03:39
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bmcculley/9085641 to your computer and use it in GitHub Desktop.
Save bmcculley/9085641 to your computer and use it in GitHub Desktop.
Find the wind chill temperature in PHP.
<?php
/*
* Wind Chill formula in PHP
* https://en.wikipedia.org/wiki/Wind_chill
*/
function windChillTemp($V,$Ta)
{
$Vpower = pow($V, 0.16);
$TaV = $Ta * $Vpower;
$Twc = 35.74 + 0.6215 * $Ta - 35.75 * $Vpower + 0.4275 * $TaV;
return round($Twc);
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment