Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

--TEST-- Trying to clone mysqli_result object --EXTENSIONS-- mysqli --SKIPIF-- <?php requi..

Decoded Output download

--TEST--
Trying to clone mysqli_result object
--EXTENSIONS--
mysqli
--SKIPIF--
<?php
require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
    require_once("connect.inc");

    if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
        printf("[001] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s
",
            $host, $user, $db, $port, $socket);

    if (!($res = mysqli_query($link, "SELECT 'good' AS morning")))
        printf("[002] [%d] %s
", mysqli_errno($link), mysqli_error($link));

    $res_clone = clone $res;
    print "done!";
?>
--EXPECTF--
Fatal error: Uncaught Error: Trying to clone an uncloneable object of class mysqli_result in %s:%d
Stack trace:
#0 {main}
  thrown in %s on line %d

Did this file decode correctly?

Original Code

--TEST--
Trying to clone mysqli_result object
--EXTENSIONS--
mysqli
--SKIPIF--
<?php
require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
    require_once("connect.inc");

    if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
        printf("[001] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
            $host, $user, $db, $port, $socket);

    if (!($res = mysqli_query($link, "SELECT 'good' AS morning")))
        printf("[002] [%d] %s\n", mysqli_errno($link), mysqli_error($link));

    $res_clone = clone $res;
    print "done!";
?>
--EXPECTF--
Fatal error: Uncaught Error: Trying to clone an uncloneable object of class mysqli_result in %s:%d
Stack trace:
#0 {main}
  thrown in %s on line %d

Function Calls

None

Variables

None

Stats

MD5 761e063ae8028eb023509012782cd002
Eval Count 0
Decode Time 109 ms