title: php create class with no variables to pass in function
body: <p>Lets say I have a class with a function in it:</p>
  
  <p>classes.php</p>
  
  <pre><code> class Foobar{
          function writeWord($word){
                 return $word;
          }
   }
  </code></pre>
  
  <p>On the page that i call this class i need to initialize the class, then call it later.</p>
  
  <p>php2.php</p>
  
  <pre><code>require_once('classes.php');
  $something = new Foobar();
  
   echo $something-&gt;writeWord('Dog');
  </code></pre>
  
  <p>The problem here is that php comes back and says Foobar is missing arguments on line 1. how can I solve this?</p>