Annotation of embedaddon/php/ext/mysqli/tests/bug28817.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Bug #28817 (problems with properties declared in the class extending MySQLi)
! 3: --SKIPIF--
! 4: <?php
! 5: require_once('skipif.inc');
! 6: require_once('skipifconnectfailure.inc');
! 7: ?>
! 8: --FILE--
! 9: <?php
! 10: require_once("connect.inc");
! 11:
! 12: class my_mysql extends mysqli {
! 13: public $p_test;
! 14:
! 15: function __construct() {
! 16: $this->p_test[] = "foo";
! 17: $this->p_test[] = "bar";
! 18: }
! 19: }
! 20:
! 21:
! 22: $mysql = new my_mysql();
! 23:
! 24: var_dump($mysql->p_test);
! 25: @var_dump($mysql->errno);
! 26:
! 27: $mysql->connect($host, $user, $passwd, $db, $port, $socket);
! 28: $mysql->select_db("nonexistingdb");
! 29:
! 30: var_dump($mysql->errno > 0);
! 31:
! 32: $mysql->close();
! 33: ?>
! 34: --EXPECTF--
! 35: array(2) {
! 36: [0]=>
! 37: %s(3) "foo"
! 38: [1]=>
! 39: %s(3) "bar"
! 40: }
! 41: NULL
! 42: bool(true)
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>