Annotation of embedaddon/php/ext/mysqli/tests/mysqli_stmt_unclonable.phpt, revision 1.1

1.1     ! misho       1: --TEST--
        !             2: Trying to clone mysqli_stmt object
        !             3: --SKIPIF--
        !             4: <?php
        !             5: require_once('skipif.inc');
        !             6: require_once('skipifemb.inc');
        !             7: require_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:        if (!$stmt = mysqli_stmt_init($link))
        !            18:                printf("[002] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
        !            19: 
        !            20:        /* no, still bails out */
        !            21:        $stmt_clone = clone $stmt;
        !            22:        print "done!";
        !            23: ?>
        !            24: --EXPECTF--
        !            25: Fatal error: Trying to clone an uncloneable object of class mysqli_stmt in %s on line %d

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>