1--TEST-- 2Trying to clone mysqli_stmt 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 (!$stmt = mysqli_stmt_init($link)) 17 printf("[002] [%d] %s\n", mysqli_errno($link), mysqli_error($link)); 18 19 /* no, still bails out */ 20 $stmt_clone = clone $stmt; 21 print "done!"; 22?> 23--EXPECTF-- 24Fatal error: Uncaught Error: Trying to clone an uncloneable object of class mysqli_stmt in %s:%d 25Stack trace: 26#0 {main} 27 thrown in %s on line %d 28