1--TEST--
2Trying to clone mysqli_result object
3--SKIPIF--
4<?php
5require_once('skipif.inc');
6require_once('skipifconnectfailure.inc');
7?>
8--FILE--
9<?php
10    require_once("connect.inc");
11
12    if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
13        printf("[001] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
14            $host, $user, $db, $port, $socket);
15
16    if (!($res = mysqli_query($link, "SELECT 'good' AS morning")))
17        printf("[002] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
18
19    $res_clone = clone $res;
20    print "done!";
21?>
22--EXPECTF--
23Fatal error: Uncaught Error: Trying to clone an uncloneable object of class mysqli_result in %s:%d
24Stack trace:
25#0 {main}
26  thrown in %s on line %d
27