С днем программиста!
class coder_day {
public function congratulate($person = false){
$person = !empty($person)?$person:'All coders';
return $person.', take a congratulations with you high day!'."rn";
}
public function celebrate(){
return 'Cheers! Lets make some fun!';
}
}
// config
$apocalypse = false;
//let's go!
if(!$apocalypse && '0x'.dechex(date('z')) == 0xFF){ // date('z') - day of year number, counted from zero, 0xFF - 255 in hexademical
$coder = new coder_day();
print $coder->congratulate();
print $coder->celebrate();
}
public function congratulate($person = false){
$person = !empty($person)?$person:'All coders';
return $person.', take a congratulations with you high day!'."rn";
}
public function celebrate(){
return 'Cheers! Lets make some fun!';
}
}
// config
$apocalypse = false;
//let's go!
if(!$apocalypse && '0x'.dechex(date('z')) == 0xFF){ // date('z') - day of year number, counted from zero, 0xFF - 255 in hexademical
$coder = new coder_day();
print $coder->congratulate();
print $coder->celebrate();
}