1--TEST--
2mysqli_result->lengths
3--EXTENSIONS--
4mysqli
5--SKIPIF--
6<?php
7require_once 'skipifconnectfailure.inc';
8?>
9--FILE--
10<?php
11    require 'table.inc';
12    $mysqli = $link;
13    if (!$res = $mysqli->query("SELECT id, label FROM test ORDER BY id LIMIT 1")) {
14        printf("[002] [%d] %s\n", $mysqli->errno, $mysqli->error);
15    }
16
17    var_dump($res->lengths);
18    while ($res->fetch_assoc())
19        var_dump($res->lengths);
20    var_dump($res->lengths);
21
22    $res->free_result();
23    try {
24        $res->lengths;
25    } catch (Error $exception) {
26        echo $exception->getMessage() . "\n";
27    }
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--EXPECT--
39NULL
40array(2) {
41  [0]=>
42  int(1)
43  [1]=>
44  int(1)
45}
46NULL
47Property access is not allowed yet
48done!
49