xref: /PHP-8.2/ext/mysqli/tests/051.phpt (revision b5a14e6c)
1--TEST--
2free statement after close
3--EXTENSIONS--
4mysqli
5--SKIPIF--
6<?php
7require_once('skipifconnectfailure.inc');
8?>
9--FILE--
10<?php
11    require_once("connect.inc");
12
13    /************************
14     * free statement after close
15     ************************/
16    $link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
17
18    $stmt1 = mysqli_prepare($link, "SELECT CURRENT_USER()");
19    mysqli_stmt_execute($stmt1);
20
21    mysqli_close($link);
22    @mysqli_stmt_close($stmt1);
23    printf("Ok\n");
24?>
25--EXPECT--
26Ok
27