unexpected result when extending abstract class
<p>I'm trying to print an error on purpose 'There is an error' but getting 'Success' message instead?</p>

<p>Any idea why?</p>

<p>Thanks</p>

<pre><code>abstract class Restful
{
  public $error = array();

  public function __construct()
  {
     //Doing something here
     //....
     //....
     $this-&gt;validate_params();
  }

  public function validate_params()
  {
     $this-&gt;error[] = 'test error';
  }
}

class RestfulRequest extends Restful
{
  public function __construct()
  {
     if (count($this-&gt;error) &gt; 0)
     {
        exit('There is an error');
     }

     echo 'Success';
  }
}

new RestfulRequest();
</code></pre>
