title: Basic php class problem
body: <p>Bear with me cos I'm new to oop!
  Is it possible to assign the result of a function to an attribute?<br>
  This probably doesn't make sense so here's what I think the code might look like!  </p>
  
  <pre><code>Class b extends a 
  { 
      public $conn= $this-&gt;connect();
  
      public function operation() { ...}
  
  }
  </code></pre>
  
  <p><code>connect()</code> is a function from class a that connects to a database and returns <code>$result</code> if successful. </p>