Defining Three Member Functions For Cat

<?php
Class Cat {
  // Constructor
  function __constructor(  ) {
  }  // The cat meows
  function meow(  ) {
    echo "Meow...";
  }  // The cat eats
  function eat(  ) {
    echo "*eats*";
  }  // The cat purrs
  function purr(  ) {
    echo "*Purr...*";
  }
}
?>

Enjoyed this post? Share it!

 

Leave a comment

Your email address will not be published.