Created
December 8, 2017 18:58
-
-
Save romanitalian/288a94c7675f574f16b73c32b0871501 to your computer and use it in GitHub Desktop.
"Happy Birthday, Alexander!" at 2017-12-08 10am
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 | |
/* | |
* "Happy Birthday, Alexander!" | |
* | |
* $Hb = new Hb; | |
* $Hb->main(); | |
*/ | |
class Hb | |
{ | |
protected $HbText = "01001000 01100001 01110000 01110000 01111001 00100000 01000010 01101001 01110010 01110100 01101000 01100100 01100001 01111001 00101100 00100000 01000001 01101100 01100101 01111000 01100001 01101110 01100100 01100101 01110010 00100001"; | |
protected $HbTextDefault = "01000111 01110010 01100101 01100001 01110100 00100000 01000100 01100001 01111001 00100001"; | |
protected $HbDate = "2017-12-08"; | |
public function getHbText() | |
{ | |
return $this->HbText; | |
} | |
public function getHbTextDefault() | |
{ | |
return $this->HbTextDefault; | |
} | |
protected function getTodayText() { | |
return date("Y-m-d") == $this->HbDate | |
? $this->getHbText() | |
: $this->getHbTextDefault(); | |
} | |
public static function main() { | |
$it = new static; | |
while (1) { | |
// Congratulate at 10am | |
if (date("H") == "10") { | |
echo $it->getTodayText(); | |
} | |
sleep(3600); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment