1--TEST--
2mysqli_result->lengths
3--EXTENSIONS--
4mysqli
5--SKIPIF--
6<?php
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    try {
28        $res->lengths;
29    } catch (Error $exception) {
30        echo $exception->getMessage() . "\n";
31    }
32    $mysqli->close();
33    print "done!";
34?>
35--CLEAN--
36<?php
37    require_once("clean_table.inc");
38?>
39<?php
40    require_once("clean_table.inc");
41?>
42--EXPECT--
43NULL
44array(2) {
45  [0]=>
46  int(1)
47  [1]=>
48  int(1)
49}
50NULL
51Property access is not allowed yet
52done!
53