Annotation of embedaddon/php/ext/mysqli/tests/bug38003.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Bug #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:
! 8: class 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:
! 17: echo "Done\n";
! 18: ?>
! 19: --EXPECTF--
! 20: Fatal error: Call to private DB::__construct() from invalid context in %s on line %d
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>