--TEST-- mysqli_fetch_array() - all datatypes but BIT --SKIPIF-- --FILE-- = 51000) && (mysqli_get_client_version($link) >= 51000))) { func_mysqli_fetch_array($link, $engine, "BIGINT", "-9223372036854775808", "-9223372036854775808", 250); func_mysqli_fetch_array($link, $engine, "BIGINT", NULL, NULL, 260); func_mysqli_fetch_array($link, $engine, "BIGINT UNSIGNED", "18446744073709551615", "18446744073709551615", 260); func_mysqli_fetch_array($link, $engine, "BIGINT UNSIGNED", NULL, NULL, 280); } func_mysqli_fetch_array($link, $engine, "FLOAT", (string)(-9223372036854775808 - 1.1), "-9.22337e+18", 290, "/-9\.22337e\+?[0]?18/iu"); func_mysqli_fetch_array($link, $engine, "FLOAT", NULL, NULL, 300); func_mysqli_fetch_array($link, $engine, "FLOAT UNSIGNED", (string)(18446744073709551615 + 1.1), "1.84467e+?19", 310, "/1\.84467e\+?[0]?19/iu"); func_mysqli_fetch_array($link, $engine, "FLOAT UNSIGNED ", NULL, NULL, 320); func_mysqli_fetch_array($link, $engine, "DOUBLE(10,2)", "-99999999.99", "-99999999.99", 330); func_mysqli_fetch_array($link, $engine, "DOUBLE(10,2)", NULL, NULL, 340); func_mysqli_fetch_array($link, $engine, "DOUBLE(10,2) UNSIGNED", "99999999.99", "99999999.99", 350); func_mysqli_fetch_array($link, $engine, "DOUBLE(10,2) UNSIGNED", NULL, NULL, 360); func_mysqli_fetch_array($link, $engine, "DECIMAL(10,2)", "-99999999.99", "-99999999.99", 370); func_mysqli_fetch_array($link, $engine, "DECIMAL(10,2)", NULL, NULL, 380); func_mysqli_fetch_array($link, $engine, "DECIMAL(10,2)", "99999999.99", "99999999.99", 390); func_mysqli_fetch_array($link, $engine, "DECIMAL(10,2)", NULL, NULL, 400); // don't care about date() strict TZ warnings... $date = @date('Y-m-d'); func_mysqli_fetch_array($link, $engine, "DATE",$date, $date, 410); func_mysqli_fetch_array($link, $engine, "DATE NOT NULL",$date, $date, 420); func_mysqli_fetch_array($link, $engine, "DATE", NULL, NULL, 430); $date = @date('Y-m-d H:i:s'); func_mysqli_fetch_array($link, $engine, "DATETIME", $date, $date, 440); func_mysqli_fetch_array($link, $engine, "DATETIME NOT NULL", $date, $date, 450); func_mysqli_fetch_array($link, $engine, "DATETIME", NULL, NULL, 460); func_mysqli_fetch_array($link, $engine, "TIMESTAMP", $date, $date, 470); $date = @date('H:i:s'); func_mysqli_fetch_array($link, $engine, "TIME", $date, $date, 480); func_mysqli_fetch_array($link, $engine, "TIME NOT NULL", $date, $date, 490); func_mysqli_fetch_array($link, $engine, "TIME", NULL, NULL, 500); func_mysqli_fetch_array($link, $engine, "YEAR", @date('Y'), @date('Y'), 510); func_mysqli_fetch_array($link, $engine, "YEAR NOT NULL", @date('Y'), @date('Y'), 520); func_mysqli_fetch_array($link, $engine, "YEAR", NULL, NULL, 530); $string255 = func_mysqli_fetch_array_make_string(255); func_mysqli_fetch_array($link, $engine, "CHAR(1)", "a", "a", 540); func_mysqli_fetch_array($link, $engine, "CHAR(255)", $string255, $string255, 550); func_mysqli_fetch_array($link, $engine, "CHAR(1) NOT NULL", "a", "a", 560); func_mysqli_fetch_array($link, $engine, "CHAR(1)", NULL, NULL, 570); $string65k = func_mysqli_fetch_array_make_string(65400); func_mysqli_fetch_array($link, $engine, "VARCHAR(1)", "a", "a", 580); func_mysqli_fetch_array($link, $engine, "VARCHAR(255)", $string255, $string255, 590); func_mysqli_fetch_array($link, $engine, "VARCHAR(65400)", $string65k, $string65k, 600); func_mysqli_fetch_array($link, $engine, "VARCHAR(1) NOT NULL", "a", "a", 610); func_mysqli_fetch_array($link, $engine, "VARCHAR(1)", NULL, NULL, 620); func_mysqli_fetch_array($link, $engine, "BINARY(1)", "a", "a", 630, null, true); func_mysqli_fetch_array($link, $engine, "BINARY(2)", chr(0) . "a", chr(0) . "a", 640, null, true); func_mysqli_fetch_array($link, $engine, "BINARY(1) NOT NULL", "b", "b", 650, null, true); func_mysqli_fetch_array($link, $engine, "BINARY(1)", NULL, NULL, 660, null, true); func_mysqli_fetch_array($link, $engine, "VARBINARY(1)", "a", "a", 670, null, true); func_mysqli_fetch_array($link, $engine, "VARBINARY(2)", chr(0) . "a", chr(0) . "a", 680, null, true); func_mysqli_fetch_array($link, $engine, "VARBINARY(1) NOT NULL", "b", "b", 690, null, true); func_mysqli_fetch_array($link, $engine, "VARBINARY(1)", NULL, NULL, 700, null, true); func_mysqli_fetch_array($link, $engine, "TINYBLOB", "a", "a", 710, null, true); func_mysqli_fetch_array($link, $engine, "TINYBLOB", chr(0) . "a", chr(0) . "a", 720, null, true); func_mysqli_fetch_array($link, $engine, "TINYBLOB NOT NULL", "b", "b", 730, null, true); func_mysqli_fetch_array($link, $engine, "TINYBLOB", NULL, NULL, 740, null, true); func_mysqli_fetch_array($link, $engine, "TINYTEXT", "a", "a", 750); func_mysqli_fetch_array($link, $engine, "TINYTEXT NOT NULL", "a", "a", 760); func_mysqli_fetch_array($link, $engine, "TINYTEXT", NULL, NULL, 770); func_mysqli_fetch_array($link, $engine, "BLOB", "a", "a", 780, null, true); func_mysqli_fetch_array($link, $engine, "BLOB", chr(0) . "a", chr(0) . "a", 780, null, true); func_mysqli_fetch_array($link, $engine, "BLOB", NULL, NULL, 790, null, true); func_mysqli_fetch_array($link, $engine, "TEXT", "a", "a", 800); func_mysqli_fetch_array($link, $engine, "TEXT", chr(0) . "a", chr(0) . "a", 810); func_mysqli_fetch_array($link, $engine, "TEXT", NULL, NULL, 820); func_mysqli_fetch_array($link, $engine, "MEDIUMBLOB", "a", "a", 830, null, true); func_mysqli_fetch_array($link, $engine, "MEDIUMBLOB", chr(0) . "a", chr(0) . "a", 840, null, true); func_mysqli_fetch_array($link, $engine, "MEDIUMBLOB", NULL, NULL, 850, null, true); func_mysqli_fetch_array($link, $engine, "MEDIUMTEXT", "a", "a", 860); func_mysqli_fetch_array($link, $engine, "MEDIUMTEXT", chr(0) . "a", chr(0) . "a", 870); func_mysqli_fetch_array($link, $engine, "MEDIUMTEXT", NULL, NULL, 880); func_mysqli_fetch_array($link, $engine, "LONGBLOB", "a", "a", 890, null, true); func_mysqli_fetch_array($link, $engine, "LONGTEXT", chr(0) . "a", chr(0) . "a", 900); func_mysqli_fetch_array($link, $engine, "LONGBLOB", NULL, NULL, 910, null, true); func_mysqli_fetch_array($link, $engine, "ENUM('a', 'b')", "a", "a", 920); func_mysqli_fetch_array($link, $engine, "ENUM('a', 'b')", NULL, NULL, 930); func_mysqli_fetch_array($link, $engine, "SET('a', 'b')", "a", "a", 940); func_mysqli_fetch_array($link, $engine, "SET('a', 'b')", NULL, NULL, 950); mysqli_close($link); if (false !== ($tmp = mysqli_fetch_array($res, MYSQLI_ASSOC))) printf("[015] Expecting false, got %s/%s\n", gettype($tmp), $tmp); print "done!"; ?> --EXPECTF-- [005] array(4) { [0]=> string(1) "1" ["id"]=> string(1) "1" [1]=> string(1) "a" ["label"]=> string(1) "a" } [006] array(2) { [0]=> string(1) "2" [1]=> string(1) "b" } [007] array(4) { [0]=> string(1) "3" ["id"]=> string(1) "3" [1]=> string(1) "c" ["label"]=> string(1) "c" } [008] array(2) { ["id"]=> string(1) "4" ["label"]=> string(1) "d" } [009] array(4) { [0]=> string(1) "5" ["id"]=> string(1) "5" [1]=> string(1) "e" ["label"]=> string(1) "e" } [011] array(11) { [0]=> string(1) "1" ["a"]=> string(1) "2" [1]=> string(1) "2" [2]=> string(1) "3" ["c"]=> string(1) "3" [3]=> string(1) "4" ["C"]=> string(1) "4" [4]=> NULL ["d"]=> NULL [5]=> string(1) "1" ["e"]=> string(1) "1" } Warning: mysqli_fetch_array(): The result type should be either MYSQLI_NUM, MYSQLI_ASSOC or MYSQLI_BOTH in %s on line %d Warning: mysqli_fetch_array(): The result type should be either MYSQLI_NUM, MYSQLI_ASSOC or MYSQLI_BOTH in %s on line %d Warning: mysqli_fetch_array(): Couldn't fetch mysqli_result in %s on line %d done!