title: Extending MySQLi
body: <p>I've run into problems extending the MySQLi class. It won't let me add any properties.</p>
  
  <pre><code>class MySQLii extends MySQLi {
  
   public $database;
  
   public function MySQLii($host, $username, $password, $database){
  
    // Initialize MySQLi
    parent::MySQLi($host, $username, $password, $database);
  
    // Save database name
    $this-&gt;database = $database;
  
   }
  
  }
  
  $mysqlii = new MySQLii('localhost', 'root', 'password', 'database');
  
  var_dump($mysqlii);
  </code></pre>
  
  <blockquote>
    <p>object(MySQLii)#1 (17) {<br>
    ["affected_rows"]=>   int(0)<br>
    ["client_info"]=>   string(48)
    "mysqlnd 5.0.5-dev - 081106 -
    $Revision: 289630 $"<br>
    ["client_version"]=>   int(50005)<br>
    ["connect_errno"]=>   int(0)<br>
    ["connect_error"]=>   NULL<br>
    ["errno"]=>   int(0)   ["error"]=><br>
    string(0) ""   ["field_count"]=><br>
    int(0)   ["host_info"]=>   string(42)
    "MySQL host info: Localhost via UNIX
    socket"   ["info"]=>   NULL<br>
    ["insert_id"]=>   int(0)<br>
    ["server_info"]=>   string(6) "5.1.44"
    ["server_version"]=>   int(50144)<br>
    ["sqlstate"]=>   string(5) "00000"<br>
    ["protocol_version"]=>   int(10)<br>
    ["thread_id"]=>   int(4019)<br>
    ["warning_count"]=>   int(0) }</p>
  </blockquote>
  
  <p>Note the absence of the <code>database</code> property I added in the MySQLii constructor. Am I missing something?</p>