title: Pass arguments to parent class constructor in PHP?
body: <p><strong>I have 2 classes where parent is inherited by child.</strong> </p>
  
  <pre><code>class parentClass
  {
      private $table_name='';
  
      public function __construct($argument)
      {
          $this-&gt;table_name=$argument;
          echo $this-&gt;table_name;
      }
  }
  
  class child extends parentClass
  {
      private $table="student";
  
      public function __construct()
      {
          parent::__construct($this-&gt;table);
      }
  }
  </code></pre>
  
  <p>There is some thing like this below that has to be used but I am unable to understand how and why.</p>
  
  <pre><code>$args = func_get_args();
  call_user_func_array(array($this, 'parent::__construct'), $args);
  </code></pre>
  
  <p><strong>Help me as</strong></p>
  
  <blockquote>
    <p>What should be the correct code to achieve the correct logic
    and please support it with a reference to gain a better understanding. </p>
  </blockquote>