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