Created
August 2, 2019 17:14
-
-
Save kylekatarnls/e92b48c8fb29d19490f5e2093a60a935 to your computer and use it in GitHub Desktop.
After else
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function getWaterState($degrees, $important = false) | |
{ | |
if ($degrees < 0) { | |
$state = 'This is solid ice'; | |
} elseif ($degrees > 100) { | |
$state = 'This is gaz water'; | |
} else { | |
$state = 'This is liquid water'; | |
} | |
if ($important) { | |
$state = uppercase($state); | |
} | |
return $state; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment