1--TEST-- 2Bug #38003 (in classes inherited from MySQLi it's possible to call private constructors from invalid context) 3--SKIPIF-- 4<?php if (!extension_loaded("mysqli")) print "skip"; ?> 5--FILE-- 6<?php 7 8class DB extends mysqli { 9 10 private function __construct($hostname, $username, $password, $database) { 11 var_dump("DB::__construct() called"); 12 } 13} 14 15$DB = new DB(); 16 17echo "Done\n"; 18?> 19--EXPECTF-- 20Fatal error: Call to private DB::__construct() from invalid context in %s on line %d 21