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