You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
681 B

19 years ago
  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. include "connect.inc";
  11. class my_mysql extends mysqli {
  12. public $p_test;
  13. function __construct() {
  14. $this->p_test[] = "foo";
  15. $this->p_test[] = "bar";
  16. }
  17. }
  18. $mysql = new my_mysql();
  19. var_dump($mysql->p_test);
  20. @var_dump($mysql->errno);
  21. $mysql->connect($host, $user, $passwd, $db, $port, $socket);
  22. $mysql->select_db("nonexistingdb");
  23. var_dump($mysql->errno > 0);
  24. $mysql->close();
  25. ?>
  26. --EXPECTF--
  27. array(2) {
  28. [0]=>
  29. %s(3) "foo"
  30. [1]=>
  31. %s(3) "bar"
  32. }
  33. NULL
  34. bool(true)