Monday, August 31, 2015

New Nick Name - "CoDEcAT --- Taking on PHP...

<!DOCTYPE html>
<html>
    <head>
 <title> Challenge Time! </title>
      <link type='text/css' rel='stylesheet' href='style.css'/>
</head>
<body>
      <p>
        <?php
          // Your code here
          class Cat
          {
              public $isAlive = true;
              public $numLegs = 4;
              public $name;
             
              function __construct($name){
                  $this->name = $name;
              }
             
              public function meow(){
                  return "Meow meow";
              }
          }
         
         
          $myCat = new Cat("CodeCat");
         
          echo $myCat->meow();
         
        ?>
      </p>
    </body>
</html>

No comments: