1--TEST--
2Trying to clone mysqli 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    $link_clone = clone $link;
17    mysqli_close($link);
18
19    print "done!";
20?>
21--EXPECTF--
22Fatal error: Uncaught Error: Trying to clone an uncloneable object of class mysqli in %s:%d
23Stack trace:
24#0 {main}
25  thrown in %s on line %d
26