SHARE
TWEET

Untitled

a guest Aug 14th, 2019 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. function getWaterState($degrees, $scale = 'celsius')
  3. {
  4.   $celsiusDegrees = $scale == 'fahrenheit'
  5.     ? $degrees * 1.8 + 32
  6.     : $degrees;
  7.  
  8.   if ($celsiusDegrees < 0) {
  9.     return 'This is solid ice';
  10.   }
  11.  
  12.   if ($celsiusDegrees > 100) {
  13.     return 'This is gaz water';
  14.   }
  15.  
  16.   return 'This is liquid water';
  17. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top