1--TEST-- 2mysql_list_processes() 3--SKIPIF-- 4<?php 5require_once('skipif.inc'); 6require_once('skipifconnectfailure.inc'); 7?> 8--FILE-- 9<?php 10include "connect.inc"; 11 12$tmp = NULL; 13$link = NULL; 14 15if (NULL !== ($tmp = @mysql_list_processes($link, $link))) 16 printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp); 17 18require('table.inc'); 19 20if (!$res = mysql_list_processes($link)) 21 printf("[002] [%d] %s\n", mysql_errno($link), mysql_error($link)); 22 23if (!$num = mysql_num_rows($res)) 24 printf("[003] Empty process list? [%d] %s\n", mysql_errno($link), mysql_error($link)); 25 26$row = mysql_fetch_array($res, MYSQL_NUM); 27if ((version_compare(PHP_VERSION, '5.9.9', '>') == 1) && !is_unicode($row[0])) { 28 printf("[004] Check for unicode support\n"); 29 var_inspect($row); 30} 31 32mysql_free_result($res); 33 34if (!$res = mysql_list_processes()) 35 printf("[005] [%d] %s\n", mysql_errno(), mysql_error()); 36 37if (!$num = mysql_num_rows($res)) 38 printf("[006] Empty process list? [%d] %s\n", mysql_errno(), mysql_error()); 39 40$row = mysql_fetch_array($res, MYSQL_NUM); 41if ((version_compare(PHP_VERSION, '5.9.9', '>') == 1) && !is_unicode($row[0])) { 42 printf("[007] Check for unicode support\n"); 43 var_inspect($row); 44} 45 46mysql_free_result($res); 47mysql_close($link); 48 49print "done!\n"; 50?> 51--EXPECTF-- 52Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in %s on line %d 53done! 54