PHP call function from parent in child best practice
<p>I have a trick question regarding PHP calling a function from parent in child class.
We have 3 scenarios, and I want pros and cons.</p>

<pre><code>&lt;?php
class test{
   private $var ;
   public function __construct(){
    $this-&gt;var = 'Hello world';
   }

   public function output(){
      echo $var.'&lt;br&gt;';
   }
}
//scenario 1
class test1 extends test{
   public function __construct(){
    parent::__construct();
   }
   public function say(){
    parent::output();
   }
}
//scenario 2
class test2 extends test{
   public function __construct(){
    test::__construct();
   }
   public function say(){
    test::output();
   }
}
//scenario 3
class test3 extends test{
    private $handle ;
    public function __construct(){
     $this-&gt;handle = new test();
    }
    public function say(){
     $this-&gt;handle-&gt;output();
    }
}
//finally I can call any 3 cases by one of the below codes
$test1 = new test1();
$test1-&gt;say();
//or
$test2 = new test2();
$test2-&gt;say();
//or
$test3 = new test3();
$test3-&gt;say();
?&gt;
</code></pre>

<p>Is there a best practice or is there any of the 3 scenarios better than other?</p>

<p>Thank you in advance.</p>
