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