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