Last active
December 17, 2015 05:19
-
-
Save mikemattner/5557105 to your computer and use it in GitHub Desktop.
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 | |
$time = time('h'); | |
function how_i_feel_today($time) { | |
switch($time) { | |
case 8: | |
case 9: | |
case 10: | |
case 11: | |
echo 'Damn, it\'s only ' . $time . '!<br />'; | |
break; | |
case 12: | |
echo $time . ', yeah, lunch time!<br />'; | |
break; | |
case 13: | |
case 14: | |
case 15: | |
case 16: | |
$hour = date('g',strtotime($time.':00:00')); | |
echo $hour.'pm...this is the longest day of my entire ever-loving life...<br />'; | |
break; | |
case 17: | |
$hour = date('g',strtotime($time.':00:00')); | |
echo $hour . 'pm! Finally. :)'; | |
break; | |
} | |
} | |
for($i = 7; $i < 18 ; $i++) { | |
how_i_feel_today($i); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment