bug75448.phpt 478 B

12345678910111213141516171819202122
  1. --TEST--
  2. mysqli_prepare() called on a closed connection should return FALSE (bug #75448)
  3. --EXTENSIONS--
  4. mysqli
  5. --SKIPIF--
  6. <?php
  7. require_once('skipifconnectfailure.inc');
  8. ?>
  9. --FILE--
  10. <?php
  11. require_once 'connect.inc';
  12. $link = mysqli_connect($host, $user, $passwd, $db, $port, $socket);
  13. mysqli_close($link);
  14. try {
  15. mysqli_prepare($link, 'SELECT VERSION()');
  16. } catch (Error $exception) {
  17. echo $exception->getMessage() . "\n";
  18. }
  19. ?>
  20. --EXPECT--
  21. mysqli object is already closed