1--TEST--
2mysqli_result->lengths
3--SKIPIF--
4<?php
5require_once('skipif.inc');
6require_once('skipifemb.inc');
7require_once('skipifconnectfailure.inc');
8?>
9--FILE--
10<?php
11	require_once("connect.inc");
12
13	if (!$mysqli = new my_mysqli($host, $user, $passwd, $db, $port, $socket))
14		printf("[001] Cannot connect\n");
15
16	require('table.inc');
17	if (!$res = $mysqli->query("SELECT id, label FROM test ORDER BY id LIMIT 1")) {
18		printf("[002] [%d] %s\n", $mysqli->errno, $mysqli->error);
19	}
20
21	var_dump($res->lengths);
22	while ($row = $res->fetch_assoc())
23		var_dump($res->lengths);
24	var_dump($res->lengths);
25
26	$res->free_result();
27	var_dump($res->lengths);
28	$mysqli->close();
29	print "done!";
30?>
31--CLEAN--
32<?php
33	require_once("clean_table.inc");
34?>
35<?php
36	require_once("clean_table.inc");
37?>
38--EXPECTF--
39NULL
40array(2) {
41  [0]=>
42  int(1)
43  [1]=>
44  int(1)
45}
46NULL
47
48Warning: main(): Property access is not allowed yet in %s on line %d
49NULL
50done!
51