Skip to content

Instantly share code, notes, and snippets.

@bobbzorzen
Created November 24, 2013 13:08
Show Gist options
  • Save bobbzorzen/7627095 to your computer and use it in GitHub Desktop.
Save bobbzorzen/7627095 to your computer and use it in GitHub Desktop.
function areaOfCylinder($r,$h) {
$areaOfCircle = pi()*pow($r,2);
$areaOfCircles = $areaOfCircle*2;
$areaAround = $h*(2*(pi()*$r));
$totalArea = $areaOfCircles+$areaAround;
return $totalArea;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment