title: Combining two or more function using classes in PHP
body: <p>I have two php classes.</p>
  
  <pre><code>Class classOne {
  
    private $stuff;
    public $stuff2;
  
    public function init(){
      dosomestuff;
    } 
  
  }
  </code></pre>
  
  <p>&amp;</p>
  
  <pre><code>Class classTwo extends classOne {
  
    private $stuff;
    public $stuff2;
  
    public function init(){ #This function is overriding the native classOne method init;
      dosomeotherstuff;
    } 
  
  }
  </code></pre>
  
  <p>When i call the function init</p>
  
  <pre><code>$obj = new classTwo();
  $obj -&gt; init(); #dosomeotherstuff
  </code></pre>
  
  <p>The PHP interpreter will <strong>dosomeotherstuff</strong> as anyone would expect, because the classTwo class declared an override on the method init;</p>
  
  <p>Instead, is there a way to combine the effect of the first init and the second, to obtain something like this?</p>
  
  <pre><code>$obj = new classTwo();
  $obj -&gt; init(); #dosomestuff, #dosomeotherstuff
  </code></pre>
  
  <p>Thanks very much</p>