Skip to content

Instantly share code, notes, and snippets.

@mikemattner
Last active December 17, 2015 05:19
Show Gist options
  • Save mikemattner/5557105 to your computer and use it in GitHub Desktop.
Save mikemattner/5557105 to your computer and use it in GitHub Desktop.
<?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