1--TEST-- 2mysqli_get_client_stats() - php_ini setting 3--EXTENSIONS-- 4mysqli 5--SKIPIF-- 6<?PHP 7require_once 'skipifconnectfailure.inc'; 8?> 9--INI-- 10mysqlnd.collect_statistics=0 11mysqlnd.collect_memory_statistics=0 12--FILE-- 13<?php 14 $before = mysqli_get_client_stats(); 15 if (!is_array($before) || empty($before)) { 16 printf("[001] Expecting non-empty array, got %s.\n", gettype($before)); 17 var_dump($before); 18 } 19 20 // connect and table inc connect to mysql and create tables 21 require_once 'connect.inc'; 22 require_once 'table.inc'; 23 $after = mysqli_get_client_stats(); 24 25 if ($before !== $after) { 26 printf("[002] Statistics have changed\n"); 27 var_dump($before); 28 var_dump($after); 29 } 30 31 foreach ($after as $k => $v) 32 if ($v != 0) { 33 printf("[003] Field %s should not have any other value but 0, got %s.\n", 34 $k, $v); 35 } 36 37 mysqli_close($link); 38 print "done!"; 39?> 40--CLEAN-- 41<?php 42 require_once 'clean_table.inc'; 43?> 44--EXPECT-- 45done! 46