Example #1
0
<?php

require_once "connect.inc";
$db = new my_mysqli($host, $user, $passwd, $db, $port, $socket);
$qry = $db->stmt_init();
$qry->prepare("SELECT REPEAT('a',100000)");
$qry->execute();
$qry->bind_result($text);
$qry->fetch();
if ($text !== str_repeat('a', $IS_MYSQLND || mysqli_get_server_version($db) > 50110 ? 100000 : (mysqli_get_server_version($db) >= 50000 ? 8193 : 8191))) {
    var_dump(strlen($text));
}
echo "Done";
<?php

require 'connect.inc';
$warning = new mysqli_warning();
$warning = new mysqli_warning(null);
$warning = new mysqli_warning(null, null);
$mysqli = new mysqli();
$warning = new mysqli_warning($mysqli);
$mysqli = new my_mysqli($host, $user, $passwd, $db, $port, $socket);
$stmt = new mysqli_stmt($mysqli);
$warning = new mysqli_warning($stmt);
$stmt = $mysqli->stmt_init();
$warning = new mysqli_warning($stmt);
$obj = new stdClass();
$warning = new mysqli_warning($obj);
include "table.inc";
$mysqli = new my_mysqli($host, $user, $passwd, $db, $port, $socket);
$res = $mysqli->query('INSERT INTO test(id, label) VALUES (1, "zz")');
$warning = mysqli_get_warnings($mysqli);
printf("Parent class:\n");
var_dump(get_parent_class($warning));
printf("\nMethods:\n");
$methods = get_class_methods($warning);
$expected_methods = array('next' => true);
foreach ($methods as $k => $method) {
    if (isset($expected_methods[$method])) {
        unset($methods[$k]);
        unset($expected_methods[$method]);
    }
}
if (!empty($methods)) {