Advertisement
Guest User

Christmas carol in code

a guest
Dec 21st, 2014
340
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. Write a Christmas carol in code. Here is my entry
  2.  
  3. <?php
  4.  
  5. class Night {
  6.  
  7. function __construct($type){
  8.  
  9. }
  10. }
  11.  
  12. class All {
  13.  
  14. public $calm = false;
  15. public $brightness = "#000000";
  16.  
  17. function __construct(){
  18.  
  19. }
  20.  
  21. public function adjustCalmness(){
  22. $this->calm = true;
  23. }
  24.  
  25. public function adjustBrightness(){
  26. $this->brightness = "#ffffff";
  27. }
  28. }
  29.  
  30. $night1 = new Night("silent");
  31. $night2 = new Night("holy");
  32.  
  33. $all = new All();
  34. $all->adjustCalmness();
  35. $all->adjustBrightness();
  36.  
  37. $yon_virgin = 1.2;
  38. $mother = 1.3;
  39. $child = 1.4;
  40.  
  41. round($yon_virgin);
  42. round($mother);
  43. round($child);
  44.  
  45. // TODO: Holy infant, tender and mild
  46.  
  47. function heavenly_peace(){
  48. sleep(100);
  49. }
  50.  
  51. heavenly_peace();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement