title: Why is child class not calling constructor of parent class?
body: <p>From php.net </p>
  
  <blockquote>
    <p>If the child does not define a constructor then it may be inherited from the parent class just like a normal class method (if it was not declared as private). </p>
  </blockquote>
  
  <p>From what I understand if I do not define a constructor in a child, the parent's constructor will be called.</p>
  
  <p>For example, I've made a parent class, with constructor. Instantiated both child and parent class, however it throws the following warning:
  <strong>Warning: Missing argument 1 for vehicle::__construct()</strong></p>
  
  <p>Example code:</p>
  
  <pre><code>class vehicle{
      protected $type;
      function __construct($type){
          $this-&gt;type = $type;
          echo "Type chosen: $this-&gt;type";
      }
  }
  
  class car extends vehicle{
  
  }
  
  $vehicle = new vehicle("sport");
  $car = new car;
  </code></pre>