1--TEST-- 2mysqli_fetch_lengths() 3--EXTENSIONS-- 4mysqli 5--SKIPIF-- 6<?php 7require_once 'skipifconnectfailure.inc'; 8?> 9--FILE-- 10<?php 11 require 'table.inc'; 12 if (!$res = mysqli_query($link, "SELECT id, label FROM test ORDER BY id LIMIT 1")) { 13 printf("[003] [%d] %s\n", mysqli_errno($link), mysqli_error($link)); 14 } 15 16 var_dump(mysqli_fetch_lengths($res)); 17 while (mysqli_fetch_assoc($res)) 18 var_dump(mysqli_fetch_lengths($res)); 19 var_dump(mysqli_fetch_lengths($res)); 20 21 mysqli_free_result($res); 22 23 try { 24 mysqli_fetch_lengths($res); 25 } catch (Error $exception) { 26 echo $exception->getMessage() . "\n"; 27 } 28 29 mysqli_close($link); 30 print "done!"; 31?> 32--CLEAN-- 33<?php 34 require_once 'clean_table.inc'; 35?> 36--EXPECT-- 37bool(false) 38array(2) { 39 [0]=> 40 int(1) 41 [1]=> 42 int(1) 43} 44bool(false) 45mysqli_result object is already closed 46done! 47